Linux-User actions

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.