[Linux Basics] - User UID and Group GID

UID and GID:

The commands to modify the user UID and group GID are usermod and groupmod. The idea is very simple. First use usermod to modify the user's uid, then use groupmod to modify the group gid, and finally use the chown and chgrp commands to modify the owner of the original user files and directories. group.

Example:

1. Modify the uid of user foo: # usermod -u 2005 foo;

2. Modify the gid of the foo group: # groupmod -g 3000 foo;

View the user's UID and GID: use the id command.

Guess you like

Origin blog.csdn.net/u014674293/article/details/105844825