1: Modify the user first: smit chuser changed the id number. success!
2: When modifying the group, a warning is reported: smit chgroup : can not update the /etc/passwd , and it is found that the group information in /etc/passwd is not updated.
3: Solution: vi /etc/passwd to modify, very fast and easy to use.
Disadvantages: Only use it as a last resort: vi /etc/passwd, vi /etc/group to modify.
Other methods you can refer to:
1: Add a new user to the group: useradd -g g1 username
2: Add an existing user to the group: usermod -G g1 username
3: To add, remove a user from a group without deleting: use gpasswd
gpasswd -d user group
For more information, please refer to: http://www.lupaworld.com/tutorial-view-aid-5312.html
Reprinted from: https://blog.csdn.net/shenghuiping2001/article/details/6106980