Linux User Creation and permission-related operation demonstration, linux operation demonstration
Basic command operations
The procedure is as follows:
Groupadd testgroupuseradd-d/usr/test-g testgroup-m testuserpasswd testuser # query user group # groups cpic # delete user # userdel cpic
Questions
The password is too short to be modified
How to change the user password in CentOS
Problem:
Invalid password: too short
Invalid password: Too simple
Invalid password: it is based on dictionary words
Solution:
1. Common users
A. Obtain the root permission of a Super User
Command: su, su-, or su-root
B. passwd User Name
2. superuser
A. Open the system-auth file.
Command: vi/etc/pam. d/system-auth
B. modify one line (set the minimum password length to 4 ):
Password requisite pam_cracklib.so try_first_pass retry = 3 type = minlen = 4
C. passwd Super User Name
Unable to obtain permissions for some Directories
Because directory B has the permission to drwxr-xr-
There are two solutions for each layer of directories:
1) make user1 the owner of the Directory
2) The directory owner is still root, but the permission is changed to xxx r-x, so that non-root users can access and read.
Reference
[1]. How to change the user password in CentOS?
[2]. In linux, you can only Log On As A guest user. you can log on as a root user or as a non-root user.
[3]. Directory Access Permissions for common users in Linux
[4] viewing all users and all user groups in Linux