Common commands
Users # Displays all logged-in Users groups # lists the current user and the group he belongs to who-Q # Show all logged-in Users Groupadd # Add Group useradd User # Build users passwd User # Change Password Userdel-R # Delete account and home directory Chown-r User:group # Modify directory owner (R recursion) chown Y\.li:mysql # Modify owner user contains points"."umask # Set user files and directories for file creation default masking value CHGRP # Modify user group Finger # Find user display information echo"TestUser"| passwd User--stdin # non-interactive change password Useradd-G www-m-s/sbin/Nologin www # Specifies that the group does not allow users to log on, Nologin allows the use of services Useradd-G www-m-s/bin/falsewww # Specifies that the group does not allow users to log on, false is the most stringent usermod-L new user name old username # Modify user name Usermod-G User Group # Modify user-owned group Usermod-D Directory-m User # Modify user home directory Usermod-G Group User # adds users to the additional group GPASSWD-d User Group # Remove the user Su from the group-User-c"#命令1;"# Toggle User Execution
Restore Password operation mode
# that goes into single-user mode: After Linux appears grub, press "e"on the installed system, then the grub configuration file appears, press the keyboard to move the cursor to the second line "Ker ... ", then press "e", then at the end of the line add: space single or Space 1 return to the car, and then press "b " reboot, enter " single user mode "
Special permission Actions
s or S (SUID): corresponds to a value of 4s or S (SGID): corresponds to a value of 2t or T: corresponds to a value of 1 large s: The delegate has root privileges, but does not have execute permissions small S: Have privileges and have execute permissions, This file can access the resources of any root user of the system T or T (Sticky):/tmp and/var/tmp directory for all users to temporarily access files, that is, each user has full access to the directory, to browse, delete and move files
Linux-User actions