当前位置:网站首页>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
边栏推荐
- 以VMware创新之道,重塑多云产品力
- UNIX socket advanced learning diary -ipv4-ipv6 interoperability
- Simply take stock reading notes (3/8)
- Distributed solution - distributed session consistency problem
- Knowledge representation (KR)
- Detailed steps for upgrading window mysql5.5 to 5.7.36
- 【云原生】Nacos中的事件发布与订阅--观察者模式
- NFT: how to make money with unique assets?
- Redis master-slave configuration and sentinel mode
- Transactions from January 6 to October 2022
猜你喜欢
ActiveMQ installation and deployment simple configuration (personal test)
Preliminary exploration of basic knowledge of MySQL
你的下一台电脑何必是电脑,探索不一样的远程操作
UNIX socket advanced learning diary - advanced i/o functions
Interviewer: is acid fully guaranteed for redis transactions?
滴滴开源DELTA:AI开发者可轻松训练自然语言模型
HiEngine:可媲美本地的云原生内存数据库引擎
stm32和电机开发(从架构图到文档编写)
Pytoch loads the initialization V3 pre training model and reports an error
【Nacos云原生】阅读源码第一步,本地启动Nacos
随机推荐
你的下一台电脑何必是电脑,探索不一样的远程操作
Preliminary exploration of basic knowledge of MySQL
ZABBIX monitors mongodb (template and deployment operations)
stirring! 2022 open atom global open source summit registration is hot!
Volatile instruction rearrangement and why instruction rearrangement is prohibited
2021-12-22 transaction record
SAP 自开发记录用户登录日志等信息
Leetcode-1. Sum of two numbers (Application of hash table)
10 minute fitness method reading notes (1/5)
View and terminate the executing thread in MySQL
Pytoch through datasets Imagefolder loads datasets directly from files
Vonedao solves the problem of organizational development effectiveness
A few years ago, I outsourced for four years. Qiu Zhao felt that life was like this
Distributed solution - completely solve website cross domain requests
VoneDAO破解组织发展效能难题
滴滴开源DELTA:AI开发者可轻松训练自然语言模型
深度长文探讨Join运算的简化和提速
Pytoch implements tf Functions of the gather() function
Reshape the power of multi cloud products with VMware innovation
Redis clean cache