I. User Management 1. View user account files
/Etc/passwd
2. Shadow
/Etc/shadow
3. Add a user
$ Useradd
Usage: useradd-o-g 0-u 0 User Name 4. Use the passwd command to set the user password.
Usage: passwd User Name 5. delete a user
$ Userdel [-r] name
6. Modify user attributes
Usermod-l user name lock account
Usermod-u username unbind account
Passwd-l user name Lock password
Passwd-u username unlock Password
Note:
A. In terms of the disabled mechanism, the account is locked by adding an exclamation point in shdow and locking the password by adding two exclamation points.
B. In principle, the password is locked before you create a password! The account and password are locked. The function is the same, but the angle is different.
7. modify a user Template
/Etc/skel
2. User Group Management 1. User Group files:
$/Etc/group
2. Add a user group:
$ Groupadd groupname
3. Specify a user group when creating a user
$ Adduser [-g group] name
4. delete a user group
$ Groupdel group
5. Change the user's group account
$ Usermod [-g group] name
3. File Permission settings 1. View File Permissions: $ ls-l
2. Change file permissions: $ chmod [ugoa…] [+-=] [Rwx] file ......
3. Modify the owner and group of the file:
Chown OWNER: [: [GROUP] FILE
Chgrp [groupname]
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.