Account management and group management in Linux

1. The main user initial profile
*.bash_profile: executed every time you log in
*.bashrc: executed every time you enter a new bash environment
*.bash_logout: executed every time you log out

2...bashrc: alias alias: look at the alias directly on the command line
3.bash_logout: logout and launch (execute file, may eliminate historical commands)
4...bash_history: historical command
5... bash_profile: execute at login, initial environment settings
6...bashrc: new When the shell interpreter is opened, execute
7. You do not need to interactively change the user password setting:
echo "…" | passwd --stdin amber
Note: When you want a shell script to set user passwords in batches, you can change "amber" to a variable, and write cycle
8. User classification
*
Super user : root
*
Ordinary user CentOS6 uid>=500, CentOS7 uid>=1000
*
Program user

9. User account file
*
/etc/passwd
*
/etc/shadow

10. Set the full character interface user mode when booting to run level
CentOS7: systemctl set-default multi-user.target
Note: To change back to the graphical interface, just change graphical to multi-user
11. Restart command
*
init 6
*
reboot

12. Shared groups, private groups
*
A user can have multiple groups, but there is only one private group. (Belonging to multiple groups is to give permissions)
*
Basic information of group accounts is stored in /etc/group/

13. Permission
*
read Read octal representation: 4
*
write Write octal representation: 2
*
x Run octal representation: 1
*

  •      无权限     8进制表示:0
    

Permission mask

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_39109226/article/details/109248919