当前位置:网站首页>Sorry, this user does not exist!
Sorry, this user does not exist!
2022-07-03 05:46:00 【Tell a joke】
List of articles
Preface
Linux The system is a multi-user and multi task time-sharing operating system , Any user who wants to use system resources , You must first apply to the system administrator for an account , Then enter the system as this account .
On the one hand, the user's account can help the system administrator to track the users who use the system , And control their access to system resources ; On the other hand, it can help users organize files , And provide security protection for users .
Each user account has a unique user name and password .
After the user enters the correct user name and password at login , You can access the system and your home directory .
Realize the management of user account , The main tasks to be completed are as follows :
- linux System user account 、 Management of user groups
- Resolve system files related to users and groups
- Set and modify user login password
One 、linux System user account 、 Management of user groups
linux User accounts are mainly divided into 3 class :
The first category :root( Super administrator ), This user has great privileges , A lot of restrictions can be ignored , Including read-write execution permissions . So this user should be careful , Because he has too much authority ;
The second category : System users , Generally, it cannot be used to log in to the system ;
The third category : It's ordinary users , Permission is limited , It can be used root Account to change your permissions ;
1、 Add a new user account :
useradd Options user name
Option description :
-u: Specify the user's id Number
-s: Specify the user's login shell Interpreter
-g: Specify the user group to which the user belongs
-G: Specifies the additional group to which the user belongs
-d: Specify the home directory to which the user belongs
2、 Delete user account :
userdel Options user name
Option description :
-r: The most commonly used option , Its main function is to delete the user's home directory
3、 Modify user account attributes :
usermod Options user name
Option description :
-u: Specify the user's id Number
-s: Specify the user's login shell Interpreter
-g: Specify the user group to which the user belongs
-G: Specifies the additional group to which the user belongs , Reset if the user has additional groups , If not, add a new additional group
-d: Specify the home directory to which the user belongs
4、 Add a new group account :
groupadd Options User group
Option description :
-g: Specifies the group identity number for the new user group (GID)
-o: Generally speaking, it is related to -g Option to use at the same time , Represents a new user group GID Can work with the system with existing user groups GID identical .
5、 Delete group account :
groupdel User group
6、 Modify the related attributes of the group account :
groupdel Options User group
-g: Specify a new group for the user group id Number
-o: Often with -g Option to use at the same time , New to the user group GID Can work with the system with existing user groups GID identical
-n The new user group : Change the name of the user group to the new name
Two 、 Resolve system files related to users and groups
1、/etc/passwd: It saves the basic information of the user account :
[[email protected] ~]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
user name : Password placeholder : user UID Number : Group ID Number : User description information : Home directory : Sign in Shell
...
Sign in shell: After the user logs in , To start a process , Responsible for passing the user's operation to the kernel , This process is the command interpreter or a specific program that the user runs after logging in to the system , namely Shell.
2、/etc/group: Save all the information of the user group :
[[email protected] ~]# cat /etc/group
root::0:root
Group name : password : Group identification number : List of users in the group
...
3、/etc/shadow: Save user password related information :
[[email protected] ~]# cat /etc/shadow
abcdef:$6$PVAvS8qk$Gvz1s3335ChBkAbe.sV5q7ftdF.2R8QbrMyiKk/UY6PespLRYXteWei3fhIvC
q5P.oAmRAKQbigfNmsARG9zR.:18407:0:99999:7:::
Login name : encrypted password : Last password change time : The shortest period of validity : The longest period of validity : Warning time : Disable time : Failure time : placeholder
...
3、 ... and 、 Set and modify user login password
Set login password (linux System regulation : The user must set the password , To log in ):
(1) Set password interactively : passwd [ user name ]
(2) Non interactive set password :echo “ password ” | passwd --stdin user name
边栏推荐
- Xaml gradient issue in uwp for some devices
- [set theory] relational closure (reflexive closure | symmetric closure | transitive closure)
- If function of MySQL
- Installation du plug - in CAD et chargement automatique DLL, Arx
- Pytorch through load_ state_ Dict load weight
- How to create your own repository for software packages on Debian
- MySQL startup error: several solutions to the server quit without updating PID file
- @Import annotation: four ways to import configuration classes & source code analysis
- [written examination question analysis] | | get [sizeof and strlen] [pointer and array] graphic explanation + code analysis
- Life is a process of continuous learning
猜你喜欢
Life is a process of continuous learning
[trivia of two-dimensional array application] | [simple version] [detailed steps + code]
Capacity expansion mechanism of map
[Zhao Yuqiang] deploy kubernetes cluster with binary package
Apt update and apt upgrade commands - what is the difference?
[teacher Zhao Yuqiang] index in mongodb (Part 2)
@Import annotation: four ways to import configuration classes & source code analysis
Altaro o365 total backup subscription plan
[set theory] relational closure (reflexive closure | symmetric closure | transitive closure)
[advanced pointer (1)] | detailed explanation of character pointer, pointer array, array pointer
随机推荐
Xaml gradient issue in uwp for some devices
Crontab command usage
[teacher Zhao Yuqiang] Flink's dataset operator
Final review (Day2)
Shanghai daoning, together with American /n software, will provide you with more powerful Internet enterprise communication and security component services
Final review (Day7)
Installing altaro VM backup
获取并监控远程服务器日志
理解 YOLOV1 第一篇 预测阶段
今天很多 CTO 都是被幹掉的,因為他沒有成就業務
中职网络子网划分例题解析
Together, Shangshui Shuo series] day 9
求质数的方法
Source insight License Activation
[teacher Zhao Yuqiang] index in mongodb (Part 2)
期末复习(DAY7)
If function of MySQL
为什么网站打开速度慢?
配置xml文件的dtd
Apache+php+mysql environment construction is super detailed!!!