Tuesday, June 17, 2014

Change username login in Ubuntu Linux

sudo bash
old=oldusername
new=newusername
useradd -G sudo tempuser
passwd tempuser
usermod -l $new $old
mv /home/$old /home/$new
usermod -m -d /home/$new $new
sudo groupmod -n $new $old
sudo usermod -c "$new" $new

No comments:

Followers