Linux-- user, system-related

User Info:

     user:

        Create a user, password: useradd: -d: Set the user's home directory -e: Set account expiration time -g: Specifies the user's primary group -p: specify a password -u: Specifies the user id

                  passwd: -k: Updates only the user's password expired passwd username

        Query user information: cat / etc / passwd: query user UID and GID cat / etc / shadow: query user password (display encrypted passwords) chage -l username: View user id expiration time Username: uid and gid

        Modify user information: su: switch user userdel: Delete User

               usermod: -d: modify the user's home directory -e: user expiration time -G: Add the user to specify a group -u: modify user id

                      usermod -aG root (group name) 123 (user name) to modify the configuration file / etc / sudoers, remove the front of the ALLOW people #

     user group:  

          Creating user groups, code: groupadd: -g 200 a: id created a group of 200 users

                     gpasswd: -a: Adding a user to a group -d: -A delete user to a group: set group administrators -M: set the team member

          Modify user group information: groupmod: -g: Specifies the new group id -n: Specifies the new group name

Directory Structure:

       etc: store configuration files

       bin: to store users and administrators frequently used commands

       sbin: storage administrator commonly used commands

       home: home directory to store user files 

       root: root user's home directory storage

       tmp: temporary run-time generated files

       var: contains various data files, log, temporary files

       usr: contains no modification of the program, the general store to install the software

       boot: When storing documents required to start

system:

    data: View System Time: data -s 'Time': Set Time

    reboot: reboot

    whoami: Displays the current user is located

    who am i: displays the login user

    who: displays all users

 

Guess you like

Origin www.cnblogs.com/szwlycw/p/11535873.html