当前位置:网站首页>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
边栏推荐
- 上午面了个腾讯拿 38K 出来的,让我见识到了基础的天花
- Compilation principle reading notes (1/12)
- Kotlin function
- Get the variable address of structure member in C language
- Learning items
- About LDA model
- Docker configures redis and redis clusters
- Language model
- Oppo Xiaobu launched Obert, a large pre training model, and promoted to the top of kgclue
- Master-slave mode of redis cluster
猜你喜欢
2021-12-22 transaction record
ActiveMQ installation and deployment simple configuration (personal test)
Comprehensive upgrade of Taobao short video photosynthetic platform
ZABBIX customized monitoring disk IO performance
Solve the problem of cache and database double write data consistency
你的下一台电脑何必是电脑,探索不一样的远程操作
我在滴滴做开源
Resnet+attention project complete code learning
Detailed steps for upgrading window mysql5.5 to 5.7.36
JDBC -- extract JDBC tool classes
随机推荐
Experimental design - using stack to realize calculator
C language structure is initialized as a function parameter
Distance measuring sensor chip 4530a used in home intelligent lighting
Free testing of Taobao tmall API order and flag insertion remark interface
Storage Basics
About LDA model
Resnet18 actual battle Baoke dream spirit
Four common problems of e-commerce sellers' refund and cash return, with solutions
Leetcode-1. Sum of two numbers (Application of hash table)
Database connection pool & jdbctemplate
太方便了,钉钉上就可完成代码发布审批啦!
【云原生】Nacos-TaskManager 任务管理的使用
GPON technical standard analysis I
What if wechat is mistakenly sealed? Explain the underlying logic of wechat seal in detail
View and modify the MySQL data storage directory under centos7
CVPR 2022 | 基于稀疏 Transformer 的单步三维目标识别器
单独编译内核模块
Yum only downloads the RPM package of the software to the specified directory without installing it
2021-12-22 transaction record
Cypher syntax of neo4j graph database