Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Apr 022011

How to rename a user in Linux?


Firstly, you need to have a account with root privileges (You cannot change the account name if you have this user currently logged in)

To rename a user, do the following steps:

1. Rename user

# sudo usermod -l new_user -d /home/new_user -m old_user

2. Update group (Usually the same as user name)

# sudo groupmod -n new_user old_user

That's all.

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>