How to rename a user in Linux

L'Antre du Tryphon

schedule
2014-05-20 | 19:52h
update
2014-05-24 | 04:45h
person
www.ctheroux.com
domain
www.ctheroux.com

How to rename a user in Linux

Simply issue this command:

usermod -m -d /home/new-account-name -l new-account-name old-account-name

It creates the home directory if it does not exists. It also copy the stuff of the old user into the new user account.

Advertisement

Imprint
Responsible for the content:
www.ctheroux.com
Privacy & Terms of Use:
www.ctheroux.com
Mobile website via:
WordPress AMP Plugin
Last AMPHTML update:
26.04.2024 - 04:21:53
Privacy-Data & cookie usage: