当前位置:网站首页>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
边栏推荐
- Redis master-slave configuration and sentinel mode
- 石臻臻的2021总结和2022展望 | 文末彩蛋
- Distributed solution - Comprehensive decryption of distributed task scheduling platform - xxljob scheduling center cluster
- Laravel文档阅读笔记-mews/captcha的使用(验证码功能)
- Neural network of PRML reading notes (1)
- Clear neo4j database data
- Docker configures redis and redis clusters
- Taobao short videos are automatically released in batches without manual RPA open source
- Distributed solution - Comprehensive decryption of distributed task scheduling platform -xxljob
- ZABBIX monitors mongodb templates and configuration operations
猜你喜欢

JSON parsing error special character processing (really speechless... Troubleshooting for a long time)

Annotation problem and hidden Markov model

Taobao order amount check error, avoid capital loss API

Super efficient! The secret of swagger Yapi

Pytoch loads the initialization V3 pre training model and reports an error

Four common problems of e-commerce sellers' refund and cash return, with solutions

Taobao short videos are automatically released in batches without manual RPA open source

2021-12-21 transaction record

激动人心!2022开放原子全球开源峰会报名火热开启!

Redis highly available sentinel mechanism
随机推荐
Comprehensive upgrade of Taobao short video photosynthetic platform
Full text search of MySQL
Transactions from December 29, 2021 to January 4, 2022
Kotlin variable
JDBC -- extract JDBC tool classes
C alarm design
Redis's memory elimination mechanism, read this article is enough.
Language model
Super efficient! The secret of swagger Yapi
Kotlin流程控制、循环
End to end neural network
Yum only downloads the RPM package of the software to the specified directory without installing it
Redis highly available sentinel mechanism
#yyds干货盘点#js截取文件后缀名
Redis clean cache
Pinduoduo flag insertion remarks API
UNIX socket advanced learning diary - advanced i/o functions
stm32和电机开发(从架构图到文档编写)
PIP command reports an error pip is configured with locations that requires tls/ssl problems
Distributed solution - completely solve website cross domain requests