/Etc/passwd SYSTEM account information
/Etc/shadow account password information is encrypted by MD5 32-bit
Add "*" in front of the password column 『*』『! "Forbidden to use an account
/Etc/group system group information
/Etc/gshadow
Newgrp change logon Group
Useradd & adduser create new user useradd-m test automatically create the user's login directory
Useradd-m-g pgroup test specifies the level
/Etc/default/useradd settings
/Etc/login. defs UID/GID settings
Passwd Change Password passwd test
Usermod
Userdel Delete account userdel-r test
Change the SHELL [-l] used when logging on to the system using chsh to display the available SHELL; [-s] modify your own SHELL.
Chfn changes the information displayed by the finger command
Finger finds and displays user information
Id: displays the user ID id test
Groupadd add Group
Groupmod is similar to usermod.
Groupdel Delete Group
Su test changes su-to root and uses the root environment variable.
Sudo executes commands in other identities
Visudo edit/etc/sudoers and add a line "test ALL = (ALL) ALL 』
% Wheel ALL = (ALL) ALL users in ALL the wheel groups in the system can use sudo.
% Wheel ALL = (ALL) NOPASSWD: ALL users in the wheel group do not use the NOPASSWD password.
User_Alias ADMPW = vbird, dmtsai, vbird1, and vbird3 are added to the ADMPW group.
Admpw all = NOPASSWD :! /Usr/bin/passwd,/usr/bin/passwd [A-Za-z] *, \
! /Usr/bin/passwd root can change the user password, but cannot change the root password (add it before the command! Cannot represent)
PAM (Pluggable Authentication Modules, Embedded Module)
Who & w view who is online
Last recent host login information
Lastlog recent logon time read/var/log/lastlog
Talk with other users
Write sending information write test [ctrl] + d send
Mesg sets the write permission for the terminal. mesg n prohibits receiving mesg y.
Wall sends a message to all users. wall this is q test
Mail write mail
/Etc/default/useradd home directory default settings
This note is shared by some common linux Account management commands. I hope you can learn it with us.