newexhsh
asked on
change user name
hello...
Can i know how to change user name in linux?
Any command can change user name?
Also, if i change the user name, their mail and ftp account also will be changed?
thx everyone to reply
Can i know how to change user name in linux?
Any command can change user name?
Also, if i change the user name, their mail and ftp account also will be changed?
thx everyone to reply
You can do this quite easily with the usermod command. The usermod command will alter all the system files which need to be changed. Have a look at "man usermode" from a command prompt (without the quotes).
ASKER
Can you give me an example because i am new in linux
thx
thx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just a few remarks:
- don't you have a GUI interface to do the changes, Yast2 or control center... ? (which linux?)
- in the manual editing case (1st answer) use "vipw" and "vipw -s" to edit passwd and shadows files - direct edition in some cases may lead to strange results...
- don't you have a GUI interface to do the changes, Yast2 or control center... ? (which linux?)
- in the manual editing case (1st answer) use "vipw" and "vipw -s" to edit passwd and shadows files - direct edition in some cases may lead to strange results...
ASKER
hello, owensleftfoot
I can run your command sucessfully.
But in "chown that part"
i run
chown -R newusername newusername
and
chown -R newusername:newusername newusername
the group remains unchanged
how can i change it?
I can run your command sucessfully.
But in "chown that part"
i run
chown -R newusername newusername
and
chown -R newusername:newusername newusername
the group remains unchanged
how can i change it?
You can use "usermod -g newgroup" to change a users initial group.
ASKER
oh....owensleftfoot
you help me alot, thx
you help me alot, thx
1) Edit of /etc/passwd, /etc/shadow, /etc/group, & /etc/gshadow
2) Rename /home/old-username /home/new-username
3) Rename of /var/spool/mail/old-userna
Other changes may to aliases, virtusertable, Samba, etc may be required.
And yes, the mail and ftp account will typically change when you change the user name.