Difference between revisions of "Rename an existing user"

From Notes_Wiki
(Created page with "<yambe:breadcrumb>Server_administration_tips_and_tricks|Server administration tips and tricks</yambe:breadcrumb> =Rename an existing user= Utilities useradd and userdel make...")
 
m
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<yambe:breadcrumb>Server_administration_tips_and_tricks|Server administration tips and tricks</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Server administration tips and tricks]] > [[Rename an existing user]]
=Rename an existing user=


Utilities useradd and userdel make it easy to create a new user or to delete an existing user.  But renaming users on Linux is tricky.  To rename any user use following steps:
Utilities useradd and userdel make it easy to create a new user or to delete an existing user.  But renaming users on Linux is tricky.  To rename any user use following steps:
Line 9: Line 8:
groupmod -n <new-name> <old-name>
groupmod -n <new-name> <old-name>
</pre>
</pre>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Server administration tips and tricks]] > [[Rename an existing user]]

Latest revision as of 15:55, 22 July 2022

Home > CentOS > CentOS 6.x > Server administration tips and tricks > Rename an existing user

Utilities useradd and userdel make it easy to create a new user or to delete an existing user. But renaming users on Linux is tricky. To rename any user use following steps:

usermod -l <new-name> <old-name>
usermod -d /home/<new-name> -m <new-name>
groupmod -n <new-name> <old-name>


Home > CentOS > CentOS 6.x > Server administration tips and tricks > Rename an existing user