A user is created in the RedHat installation system. It takes too long to change it to a short point. The modification method is as follows (all under root );
1. Modify the user's
Login Name and logon directory, edit the/etc/passwd file, find your current user's entry, and modify it:
Newname: X: 500: 500:/home/newname:/bin/bash
2. Modify the username entry in/etc/shadow:
Newname: $1 $ cnry3oel $ zcuzip1q1x75prfwq. dkm1: 14983: 0: 99999: 7 :::
3. Modify the logon directory:
MV/home/oldname/home/newname
4. Modify the group name, edit the/etc/group file, find the entries in the group, and modify them:
Newgroupname: X: 500: newname
5. If sudo is started, modify the/etc/sudoers file. Change oldername to newname
User name, group name, and sudo can take effect only after the configuration file is modified, but the login directory must be restarted before using Cd ~ Command to enter the new logon directory.