linux下如何修改用户名

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
红十月
帖子: 3
注册时间: 2008-11-12 15:15

linux下如何修改用户名

#1

帖子 红十月 » 2008-11-12 15:50

我用 usermod -l shenjian  这样打命令对把?

回车后弹出
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


到底如何修改?麻烦达人说下  谢谢
meng8131
帖子: 6
注册时间: 2008-11-09 17:38

Re: linux下如何修改用户名

#2

帖子 meng8131 » 2008-11-12 16:54

这个问题我也想知道!~!
用户名能不能输中文呀!~!
头像
kia
帖子: 144
注册时间: 2007-11-05 15:55

Re: linux下如何修改用户名

#3

帖子 kia » 2008-11-15 23:53

修改用户名:

代码: 全选

Usermod -l "新用户名" "老用户名"
至于中文用户名.没试过,应该不允许吧

Good luck~
头像
carlchou00
帖子: 113
注册时间: 2009-03-22 20:31
来自: 長沙滴

Re: linux下如何修改用户名

#4

帖子 carlchou00 » 2009-04-09 21:41

我試試啊
头像
linuxier
帖子: 317
注册时间: 2008-05-27 10:45
联系:

Re: linux下如何修改用户名

#5

帖子 linuxier » 2009-04-09 21:55

想像一下,哪天 X 挂了,要在 tty 中登录,你就干瞪眼吧,哈哈。从此以后,你就再也不会想要中文用户名了。
lrz
帖子: 10
注册时间: 2006-11-14 11:45

Re: linux下如何修改用户名

#6

帖子 lrz » 2009-04-19 12:54

linuxier 写了:想像一下,哪天 X 挂了,要在 tty 中登录,你就干瞪眼吧,哈哈。从此以后,你就再也不会想要中文用户名了。
看看这个,当然后果自负
http://groups.google.com/group/ucimf/br ... 4dffdcb27d
回复