Linux users view and manage commands 1. Linux users view all users in linux. there are no convenient commands like windows netuser and netlocalgroup to manage users. (1) in the terminal. you only need to view the/etc/passwd file. (2) Check the third parameter :... linux users view and manage commands 1. Linux users view all users in linux. there are no convenient commands like windows net user and net localgroup to manage users. (1) in the terminal. you only need to view the/etc/passwd file. (2) Check the third parameter: more than 500, which is the user created later. others are system users. or use cat/etc/passwd | cut-f 1-d: 2. user management command useradd note: Add user adduser note: Add user passwd note: set password usermod for user note: modify user commands by using userm Od to modify the login name, user's home directory, etc.; pwcov note: synchronize the user from/etc/passwd to/etc/shadow pwck note: pwck verifies whether the content of the/etc/passwd and/etc/shadow files in the user configuration file is legal or complete. pwunconv note: it is a vertical reverse operation of pwcov, is to create/etc/passwd from/etc/shadow and/etc/passwd, and then delete the/etc/shadow file; finger note: View user information tool id note: view the UID, GID, and chfn of the user group. note: change the user information tool su note: User switching tool sudo note: sudo uses another user to execute commands (execute a command as another user), su is used to switch users, and then the user to complete the corresponding tasks, however, sudo can directly execute the following commands. for example, sudo does not require root password. Only the root user can execute the corresponding commands, but the/etc/sudoers must be edited by running do. do note: visodo is the command for editing/etc/sudoers. you can also directly use vi to edit/etc/sudoers, which has the same effect. sudoedit note: similar to the sudo function; 3. tools or commands for managing user groups; groupadd note: Add user groups; groupdel note: delete user groups; groupmod note: modify user group information groups note: display the user group grpck GR conv. note: You can synchronize or create/etc/gshadow by using the file content of/etc/group and/etc/gshadow. if/etc/gshadow does not exist, create it; grpunconv note: synchronize or Create/etc/group and delete the gshadow file.
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