How do i rename a linux user account, including the home directory?
-
Man page for usermod: https://www.lightnetics.com/post/4015
-l - new login name
-m - make home directory
-d - new home directory
old user account$ sudo usermod -l joebloggs -m -d /home/joebloggs joeb
change the group using this.
$ sudo groupmod -n joeb joebloggs
groupmod -n "old group" "new group"
© Lightnetics 2024