当前位置:网站首页>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
边栏推荐
- ZABBIX customized monitoring disk IO performance
- About cache exceptions: solutions for cache avalanche, breakdown, and penetration
- ZABBIX agent2 installation
- Transactions from December 29, 2021 to January 4, 2022
- 2021.12.16-2021.12.20 empty four hand transaction records
- Four common problems of e-commerce sellers' refund and cash return, with solutions
- Leetcode-1. Sum of two numbers (Application of hash table)
- Redis highly available sentinel cluster
- Kotlin流程控制、循环
- PIP command reports an error pip is configured with locations that requires tls/ssl problems
猜你喜欢

About LDA model

Oppo Xiaobu launched Obert, a large pre training model, and promoted to the top of kgclue

Yum only downloads the RPM package of the software to the specified directory without installing it

Master-slave mode of redis cluster

Constructing expression binary tree with prefix expression

国内市场上的BI软件,到底有啥区别

CVPR 2022 | 基于稀疏 Transformer 的单步三维目标识别器

从39个kaggle竞赛中总结出来的图像分割的Tips和Tricks

深度长文探讨Join运算的简化和提速

JDBC exercise - query data encapsulated into object return & simple login demo
随机推荐
NPM install reports an error
Redis cluster configuration
Notes for preparation of information system project manager --- information knowledge
DNS的原理介绍
Free testing of Taobao tmall API order and flag insertion remark interface
ActiveMQ installation and deployment simple configuration (personal test)
非技术部门,如何参与 DevOps?
Taobao, pinduoduo, jd.com, Doudian order & Flag insertion remarks API solution
NLP engineer learning summary and index
Making and using the cutting tool of TTF font library
Detailed structure and code of inception V3
Clear neo4j database data
Add a new cloud disk to Huawei virtual machine
What if wechat is mistakenly sealed? Explain the underlying logic of wechat seal in detail
Anaconda creates a virtual environment and installs pytorch
ZABBIX agent2 installation
由扫地增而引起的小叙
HiEngine:可媲美本地的云原生内存数据库引擎
Common commands and basic operations of Apache Phoenix
Distributed solution - Comprehensive decryption of distributed task scheduling platform -xxljob