当前位置:网站首页>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
边栏推荐
- [teacher Zhao Yuqiang] use Oracle's tracking file
- 获取并监控远程服务器日志
- [branch and cycle] | | super long detailed explanation + code analysis + a trick game
- Communication - how to be a good listener?
- Error 1045 (28000) occurs when Linux logs in MySQL: access denied for user 'root' @ 'localhost' (using password: yes)
- 求质数的方法
- Detailed explanation of iptables (1): iptables concept
- mapbox尝鲜值之云图动画
- AtCoder Beginner Contest 258(A-D)
- pytorch 多分类中的损失函数
猜你喜欢
![Ensemble, série shuishu] jour 9](/img/39/c1ba1bac82b0ed110f36423263ffd0.png)
Ensemble, série shuishu] jour 9

Kubernetes resource object introduction and common commands (V) - (configmap)

Capacity expansion mechanism of map
![[teacher Zhao Yuqiang] Alibaba cloud big data ACP certified Alibaba big data product system](/img/cc/5509b62756dddc6e5d4facbc6a7c5f.jpg)
[teacher Zhao Yuqiang] Alibaba cloud big data ACP certified Alibaba big data product system
![[teacher Zhao Yuqiang] MySQL high availability architecture: MHA](/img/a7/2140744ebad9f1dc0a609254cc618e.jpg)
[teacher Zhao Yuqiang] MySQL high availability architecture: MHA

Configure DTD of XML file

PHP notes are super detailed!!!

kubernetes资源对象介绍及常用命令(五)-(ConfigMap)
![[teacher Zhao Yuqiang] the most detailed introduction to PostgreSQL architecture in history](/img/18/f91d3d21a39743231d01f2e4015ef8.jpg)
[teacher Zhao Yuqiang] the most detailed introduction to PostgreSQL architecture in history

Brief introduction of realsense d435i imaging principle
随机推荐
Export the altaro event log to a text file
2022.6.30DAY591
期末复习(DAY7)
卷积神经网络CNN中的卷积操作详解
[trivia of two-dimensional array application] | [simple version] [detailed steps + code]
Communication - how to be a good listener?
Brief introduction of realsense d435i imaging principle
"C and pointer" - Chapter 13 function of function pointer 1 - callback function 1
Get and monitor remote server logs
Notepad++ wrap by specified character
70 shell script interview questions and answers
今天很多 CTO 都是被幹掉的,因為他沒有成就業務
ES 2022 正式发布!有哪些新特性?
Best practices for setting up altaro VM backups
[Shangshui Shuo series together] day 10
[teacher Zhao Yuqiang] redis's slow query log
Source insight License Activation
Solve the problem of automatic disconnection of SecureCRT timeout connection
[written examination question analysis] | | get [sizeof and strlen] [pointer and array] graphic explanation + code analysis
CAD插件的安装和自动加载dll、arx