1. Establish the required group (vi/etc/group) first;
2. Synchronization of/etc/group and/etc/gshadow (GRPCONV);
3. Set up the account of each attribute (VI/ETC/PASSWD);
4. Synchronization of/etc/passwd and/etc/shadow (PWCONV);
5. Establish the password of the account (passwd accountname);
6. Establishment of User home directory (cp-a/etc/skel/home/accountname);
7. Change the properties of the Consumer home directory (Chown-r accountname.group/home/accountname).
Example:
1. Create a group Normalgroup, assuming that 520 of this GID is not being used. and synchronized Gshadow
[Root@linux ~]# Vi/etc/group
# Join the line below on the last line.
normalgroup:x:520:
[Root@linux ~]# Grpconv
[Root@linux ~]# grep ' Normalgroup '/etc/group/etc/gshadow
/etc/group:normalgroup:x:520:
/ETC/GSHADOW:NORMALGROUP:X::
Simple Take care of the group. ^_^
2. Establish Normaluser This account, assuming that UID 700 has not been used.
[Root@linux ~]# vi/etc/passwd
# Join the line below on the last line.
Normaluser:x:700:520::/home/normaluser:/bin/bash
3. Synchronize the password and establish the user's password
[Root@linux ~]# Pwconv
[Root@linux ~]# grep ' Normaluser '/etc/passwd/etc/shadow
/etc/passwd:normaluser:x:700:520::/home/normaluser:/bin/bash
/etc/shadow:normaluser:x:13030:0:99999:7:::
Oh Yes, that's right. It's all set up, but the code's not right.
[Root@linux ~]# passwd Normaluser
Changing password for user normaluser.
New UNIX Password:
Retype new UNIX Password:
Passwd:all authentication tokens updated successfully.
4. Create a user's home directory and revise permissions.
[Root@linux ~]# cp-a/etc/skel/home/normaluser
[Root@linux ~]# chown-r Normaluser:normalgroup/home/normaluser