Objective
???? has been in the root user, the other users are dead?? Ha ha haha
?
Body
- Root user
- Root is like administrator in Windows
- Each user has a user-specific folder (or not). root directory is special, in/root
- The rest of the user's directory is/home/xxxx
- Useradd Creating a user
- Execute which useradd,/usr/spin
Ps:
(1)/bin contains tools that administrators and other users can use
(2)/usr (Unix software source) represents the installed application catalog
(3)/usr/bin generally, by default, administrators and other users can use the
???????????? (4)/usr/sbin represents a tool that only administrators can use in the installation software
- Useradd Fatsnake
Ps:
(1) created a user, in the home directory to wear a folder called Fatsnake
- Delete User Userdel-r Fatsnake
If you do not add-r just delete the user, will not delete the relevant files, such as/home/fatsnake
- Set Password
passwd User Name
Enter two times the same as OK
- View User cat/etc/passwd
Ps:
Fatsnake:x:500:500:fatsnake:/home/fatsnake:/bin/bash
- Split with Colon
- The first bit is the username, the second is the password (invisible, encrypted)
- The third digit is the user ID, number. The average user starts at 500. The fourth bit is the user group ID. The fifth bit is remark
- The sixth bit is the user home directory
- The seventh bit is the user's default shell
- Create a user group
Groupadd Group Name
Cat/etc/group View Groups
The new user defaults to creating a user group with the same name, and when the group has only one user and you perform the delete operation, the group is gone.
- Disable user shell logon
Use usermod-s/sbin/nologin user name
(You can also useradd-s/sbin/nologin user name when you create it)
Ps: A software that only allows a user to be used within the environment, not allowed to log in
?
?
?
End
16. System account and file