当前位置:网站首页>Rhcsa 07 - user and group management
Rhcsa 07 - user and group management
2022-07-04 04:29:00 【Wangwanlin Ben】
RHEL 8 stay /etc/login.defs Defines the properties of the newly created user ,
[[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
Change password validity
[[email protected] ~]# sed -i 's/99999/90/' /etc/login.defs
stay /etc/skel Create files in folders , Any files in this directory will be copied to the home directory of the newly created user ,
[[email protected] ~]# echo hello > /etc/skel/greetings
Create user anna, increase secondary group 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)
View password validity ,
[[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
see anna Home directory , see /etc/skel Your file has been copy Over here. ,
[[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
边栏推荐
- Graduation project
- 网络 - VXLAN
- 浅谈一篇优质的小红书文案需要具备什么
- Select function variable column name in dplyr of R language
- [microservice openfeign] @feignclient detailed explanation
- RHCSA 03 - 文件的基础权限
- leetcode刷题:二叉树09(二叉树的最小深度)
- 多位科技公司创始人向Entrepreneur First提供高达1.58亿美元的C轮融资,协助其投资下一代全球创新者
- [microservices openfeign] two degradation methods of feign | fallback | fallbackfactory
- 苹果CMS仿西瓜视频大气响应式视频模板源码
猜你喜欢
leetcode刷题:二叉树07(二叉树的最大深度)
How to telecommute more efficiently | community essay solicitation
Graduation project: design seckill e-commerce system
Flink learning 7: application structure
微信公众号无限回调授权系统源码
【愚公系列】2022年7月 Go教学课程 001-Go语言前提简介
How to view installed r packages in R language
Architecture practice camp - graduation project of module 9 of phase 6
虚拟商品帐号交易平台源码_支持个人二维码收款
深入解析结构化异常处理(SEH) - by Matt Pietrek
随机推荐
Graduation project
How to view installed r packages in R language
Leader: who uses redis expired monitoring to close orders and get out of here!
Understand the principle of bytecode enhancement technology through the jvm-sandbox source code
Select function variable column name in dplyr of R language
Three years of graduation, half a year of distance | community essay solicitation
Architecture practice camp - graduation project of module 9 of phase 6
Unity draws the trajectory of pinball and billiards
C language bidirectional linked list first edition
Asynchronous development process - touch your hand and lead you to realize a promise
UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x98 in position 1093: illegal multibyte sequence
程序员远程办公喜忧参半| 社区征文
Imitation of "game bird" source code, mobile game issue evaluation, open service, open test collection, game download website template
Wechat brain competition answer applet_ Support the flow main belt with the latest question bank file
UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x98 in position 1093: illegal multibyte sequence
RHCSA 08 - automount配置
RPC技术
Unity资源路径
ctf-pikachu-XSS
dried food! Generation of rare samples based on GaN