当前位置:网站首页>RHCSA5
RHCSA5
2022-07-05 12:50:00 【Grey rain】
user 、 Group and sudo
Every user has a id Number
root Of uid Number is 0
uid 1-200 Users automatically created by the system
uid 201-999 Install third-party applications
uid 1000+ Other ordinary users created manually
/etc/passwd
Storage content
First column : user name
Second column :x( Originally password , Move back )
The third column :uid
The fourth column :gid
Followed by notes 、 Home directory 、 Login mode
Group
Each user belongs to a group , Defined as a collection of users
/etc/group
Storage content
First column : Group name
Second column :x( Originally password , Move back )
The third column :gid
obtain root jurisdiction
su Switching users , Temporary switching ,root No password is required for switching , The home directory doesn't change , I won't use the environment variables of new users
su - Switching users , Home directory transformation , Will use the environment variables of new users
sudo Raise the right
visudo To write
vim /etc/sudoers.d
visudo Specific operation
visudo
Cursor to end 
rewrite ,student Can perform all privileges 
rewrite ,student It can be executed useradd and su
Log of execution
/var/log/secure
Create user
useradd
-d Specify home directory ( Home directory exists , Default home)
-e Specify expiration date
-g Appoint gid
tail -1 /etc/passwd
tail /etc/shadow
Random string ; password (hash), Creation time ( Days , The current date -1970.7.1); The password should be changed on the day when it is created ; Change the password for the number of days used ; Password expiration warning time
useradd No password , Use passwd To set the password
usermod
-u Group number user
-G Specify a new additional group
-a Specify to add an additional group
-L Lock the user , Unable to log in temporarily
-u user Unlock
groupadd Create group
groupmems
-d Delete a user of the Group -g The specified group
groupdel -r
userdel -r
-r Use as much as possible
chage The number of days to change the user's password
边栏推荐
- Taobao order interface | order flag remarks, may be the most stable and easy-to-use interface
- Clear neo4j database data
- Rasa Chat Robot Tutorial (translation) (1)
- Distributed solution - distributed session consistency problem
- Pytorch two-layer loop to realize the segmentation of large pictures
- [figure neural network] GNN from entry to mastery
- ZABBIX agent2 installation
- Distributed solution - completely solve website cross domain requests
- Vonedao solves the problem of organizational development effectiveness
- Transactions on December 23, 2021
猜你喜欢

Compilation principle reading notes (1/12)

《信息系统项目管理师》备考笔记---信息化知识

VoneDAO破解组织发展效能难题

Distance measuring sensor chip 4530a used in home intelligent lighting

I met Tencent in the morning and took out 38K, which showed me the basic smallpox

Implementing Yang Hui triangle with cyclic queue C language

SAP 自开发记录用户登录日志等信息

Add a new cloud disk to Huawei virtual machine

Super efficient! The secret of swagger Yapi

Redis clean cache
随机推荐
GNN(pytorch-geometric)
石臻臻的2021总结和2022展望 | 文末彩蛋
《信息系统项目管理师》备考笔记---信息化知识
Docker configures redis and redis clusters
在家庭智能照明中应用的测距传感芯片4530A
Implementing Yang Hui triangle with cyclic queue C language
Kotlin流程控制、循环
Compilation principle reading notes (1/12)
Yum only downloads the RPM package of the software to the specified directory without installing it
Redis cluster configuration
Learning items
C alarm design
Distance measuring sensor chip 4530a used in home intelligent lighting
以VMware创新之道,重塑多云产品力
Sqoop import and export operation
Laravel文档阅读笔记-mews/captcha的使用(验证码功能)
Simply take stock reading notes (4/8)
The relationship between the size change of characteristic graph and various parameters before and after DL convolution operation
谈谈我写作生涯的画图技巧
NPM install reports an error