更改登陆的用户名:
ldd6410默认是lihacker,呵呵,不太习惯这个。
参考http://forum.ubuntu.org.cn/viewtopic.php?f=50&t=149847
zhangbin@lihacker-laptop:~$ usermod
Usage: usermod [options] LOGIN
Options:
-c, --comment COMMENT new value of the GECOS field
-d, --home HOME_DIR new home directory for the user account
-e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
-f, --inactive INACTIVE set password inactive after expiration
to INACTIVE
-g, --gid GROUP force use GROUP as new primary group
-G, --groups GROUPS new list of supplementary GROUPS
-a, --append append the user to the supplemental GROUPS
mentioned by the -G option without removing
him/her from other groups
-h, --help display this help message and exit
-l, --login NEW_LOGIN new value of the login name
-L, --lock lock the user account
-m, --move-home move contents of the home directory to the
new location (use only with -d)
-o, --non-unique allow using duplicate (non-unique) UID
-p, --password PASSWORD use encrypted password for the new password
-s, --shell SHELL new login shell for the user account
-u, --uid UID new UID for the user account
-U, --unlock unlock the user account
zhangbin@lihacker-laptop:~$
用法为 usermod -l 新用户名 老用户名
===========================
更改密码:
passwd 用户名
会提示输入新密码和老密码。
参考http://blog.youkuaiyun.com/guanggy/article/details/4636884
然后一路exit,重新登陆console,就可以了。
本文介绍了如何在Ubuntu系统中使用usermod命令更改用户的登录名,以及如何利用passwd命令更新用户的密码。通过简单的步骤说明,帮助用户快速掌握操作流程。
430

被折叠的 条评论
为什么被折叠?



