当前位置:网站首页>RHCSA 07 - 用户与群组管理
RHCSA 07 - 用户与群组管理
2022-07-04 03:51:00 【王万林 Ben】
RHEL 8在/etc/login.defs定义了新创建用户的属性,
[[email protected] ~]# cat /etc/login.defs | grep -v '^#'
MAIL_DIR /var/spool/mail
UMASK 022
HOME_MODE 0700
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
PASS_MIN_LEN 5
PASS_WARN_AGE 7
UID_MIN 1000
UID_MAX 60000
SYS_UID_MIN 201
SYS_UID_MAX 999
GID_MIN 1000
GID_MAX 60000
SYS_GID_MIN 201
SYS_GID_MAX 999
CREATE_HOME yes
USERGROUPS_ENAB yes
ENCRYPT_METHOD SHA512修改密码有效期
[[email protected] ~]# sed -i 's/99999/90/' /etc/login.defs在/etc/skel文件夹里创建文件,任何在该目录下的文件将会被拷贝到新创建用户的家目录,
[[email protected] ~]# echo hello > /etc/skel/greetings创建用户anna,增加secondary群组sales,
[[email protected] ~]# groupadd sales
[[email protected] ~]# useradd -G sales anna
[[email protected] ~]# echo mysecretpassword | passwd --stdin anna
Changing password for user anna.
passwd: all authentication tokens updated successfully.
[[email protected] ~]# id anna
uid=1001(anna) gid=1002(anna) groups=1002(anna),1001(sales)查看密码有效期,
[[email protected] ~]# chage -l anna
Last password change : Jul 02, 2022
Password expires : Sep 30, 2022
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 90
Number of days of warning before password expires : 7查看anna的家目录,看/etc/skel的文件已经被copy过来了,
[[email protected] ~]# ls -al /home/anna
total 16
drwx------. 2 anna anna 79 Jul 2 07:06 .
drwxr-xr-x. 4 root root 32 Jul 2 07:06 ..
-rw-r--r--. 1 anna anna 18 Jul 27 2021 .bash_logout
-rw-r--r--. 1 anna anna 141 Jul 27 2021 .bash_profile
-rw-r--r--. 1 anna anna 376 Jul 27 2021 .bashrc
-rw-r--r--. 1 anna anna 6 Jul 2 07:06 greetings边栏推荐
- Confession code collection, who says program apes don't understand romance
- ctf-pikachu-CSRF
- 华为云鲲鹏工程师培训(广西大学)
- *. No main manifest attribute in jar
- [book club issue 13] multimedia processing tool ffmpeg tool set
- Redis cluster uses Lua script. Lua script can also be used for different slots
- The maximum expiration time of client secret in azure ad application registration is modified to 2 years
- Katalon使用script实现查询List大小
- Flink学习6:编程模型
- How to telecommute more efficiently | community essay solicitation
猜你喜欢

2021 RSC | Drug–target affinity prediction using graph neural network and contact maps

LNK2038 检测到“RuntimeLibrary”的不匹配项: 值“MD_DynamicRelease”不匹配值“MDd_DynamicDebug”(main.obj 中)

毕业设计:设计秒杀电商系统

Parameterization of controls in katalon

SQL語句加强練習(MySQL8.0為例)

Penetration practice - sqlserver empowerment

Detailed explanation of PPTC self recovery fuse

【CSRF-01】跨站请求伪造漏洞基础原理及攻防

Exercices de renforcement des déclarations SQL (MySQL 8.0 par exemple)

Two commonly used graphics can easily realize data display
随机推荐
AAAI2022 | Word Embeddings via Causal Inference: Gender Bias Reducing and Semantic Information Preserving
Programmers' telecommuting is mixed | community essay solicitation
Common methods of threads
Introduction to asynchronous task capability of function calculation - task trigger de duplication
Select sorting and bubble sorting template
还原窗口位置的微妙之处
Confession code collection, who says program apes don't understand romance
PostgreSQL users cannot create table configurations by themselves
1289_ Implementation analysis of vtask suspend() interface in FreeRTOS
Why is the probability of pod increasing after IPtable
Database SQL statement summary, continuous update
ctf-pikachu-CSRF
CesiumJS 2022^ 源码解读[0] - 文章目录与源码工程结构
JS实现文字滚动 跑马灯效果
Distributed system: what, why, how
[Huawei cloud IOT] reading notes, "Internet of things: core technology and security of the Internet of things", Chapter 3 (I)
Restore the subtlety of window position
用于TCP协议交互的TCPClientDemo
“软硬皆施”,助力建成新型云计算数据中心
pytest多进程/多线程执行测试用例