📌  相关文章
📜  重命名用户名 ubuntu 20.04 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:58.298000             🧑  作者: Mango

代码示例2
# -l changes login name
# -d changes home directory
# -m copies over contents from old home directory
usermod -l  -d /home/ -m 

# NOTE: will not work if you are currently logged on as user
# - workaround by temporarily enabling root account and running above command there
# [sudo passwd root] 
# - after root account has been used to change username lock it using
# [sudo passwd -l root]