How To Rename Or Change User Name In Linux

On 2013年02月4日, in tips, by netoearth

Question : How  to  rename or  change user name in Linux?



killall -u old
id old
usermod -l new old
groupmod -n new old
usermod -d /home/new -m new
usermod -c “New Real Name” new
id new


kill -u pirat9
 #id pirat9
uid=1000(pirat9) gid=1000(pirat9) groups=1000(pirat9),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),109(lpadmin),127(sambashare)
# id blanco
uid=1001(blanco) gid=1001(blanco) groups=1001(blanco)
pirat9@pirat9 ~ $
usermod -l  blanco pirat9
groupmod -n blanco pirat9
usermod -d /home/blanco -m  blanco
usermod -c "James Bond" blanco
id blanco


Tagged with:  

Comments are closed.