Linux-user management, linux User List
Add User:
Useradd [options] Jack
-U 1000, specify UID
-G 1000: Specify the GID (basic group). The Group must exist.
-G gid (additional group), the Group must exist.
-C: Specify the annotation information.
-D/home/Jack: Specifies the home Directory
-S/bin/tcsh: Specifies the shell path.
-M-k: create a home directory
-M: No home directory is created.
/Etc/shells, specifying the Security shell available for the current system
/Etc/login. defs,
/Etc/skel/, bash environment configuration file
Delete A User:
Userdel [options] Jack, delete the user, but do not delete the Home Directory
-R: Delete the home directory at the same time.
Id to view the user's account attributes
Id user1
-U, UID
-G, GID, basic group
-G, GID, additional group
-N, name, name
Finger Jack, view User Account Information
Modify user
Usermod [options] Jack
-U UID
-G GID. The changed basic group must exist.
-G gid. If the-a option is not used, the additional group will be overwritten;
-A, append, append
-D,-m: Specify the new home directory and move the files in the original home directory to the new home directory.
-S, shell
-L, login name, Change User name
-L, lock, lock the user
-U, unlock, unlock user
Chsh: change shell, modify the user's shell Information
Chfn: change finger, modify comment information
Password Management:
Passwd Jack
-- Stdin, standard input, from keyboard
Echo "RedHat" | passwd -- stdin Jack
-L, lock, lock the user
-U, unlock, unlock user
-D: Delete the user password.
PAM: