[Linux] Linux common commands

    1. See all users: CAT   / etc / passwd, the third argument: more than 500, the user is behind the construction of the user compared with other systems. Or cat / etc / passwd | cut -f 1 -d
    2. User management commands:

 

    1. Add a user: useradd or adduser
    2. Set user password: passwd
    3. Modify user command, you can modify the login name, the user's home directory, and so on through the usermod: usermod
    4. Synchronization user from the / etc / passwd to / etc / shadow: pwcov
    5. pwck is the check user profiles / etc / passwd and / etc / shadow file content is legitimate or complete: pwck
    6. From / etc / shadow and / etc / passwd create / etc / passwd, then deletes / etc / shadow file: pwcov stand reverse operation
    7. View User Information Tool: finger
    8. View user's UID, GID and user group belongs: id
    9. Changing user information tools: chfn
    10. User Switching tool: su
    11. sudo is performed by another user command (execute a command as another user), su is used to switch the user, and to complete the corresponding task by the user to switch to, but can directly execute the command sudo later, does not require such root sudo but come to realize editing by visudo / etc / sudoers; password can be assigned to perform root with only root can execute the appropriate command execution
    12. Edit / etc / sudoers command; this command can not directly use vi to edit / etc / sudoers effect is the same: visudo
    13. And sudo functionality similar: sudoedit
  1. Administrative user group (group) of the tool or command
    1. Add a user group: groupadd
    2. Delete a user group: groupdel
    3. Modify user group information: groupmod
    4. User group display user belongs to: groups
    5. By / etc / group and / etc / gshadow file to synchronize content or create / etc / gshadow, if the / etc / gshadow does not exist, create: grpconv
    6. Synchronized via / etc / group and / etc / gshadow file content or create / etc / group, and then delete gshadow file: grpunconv

Guess you like

Origin www.cnblogs.com/Y-S-X/p/12142618.html