#!/bin/bash

# 检查是否以root权限运行
if [ "$(id -u)" -ne 0 ]; then
  echo "请以root权限运行此脚本" >&2
  exit 1
fi

newname="a123"

#Add New User
deluser --remove-home $newname

echo "delete success, Name:$newname"

# 修改系统语言为英文
LFILE="/etc/default/locale"

cp $LFILE $LFILE.bak

echo 'LANG="en_US.UTF-8"' | tee $LFILE >/dev/null
echo 'LANGUAGE="en_US.UTF-8"' | tee -a $LFILE >/dev/null
echo 'LC_ALL="en_US.UTF-8"' | tee -a $LFILE >/dev/null

source /etc/default/locale

echo "当前语言设置："
locale

echo "注销系统或重启系统"

# adduser heco
# usermod -aG sudo heco
# deluser --remove-home a123
