当前位置:网站首页>Rocky基础知识1
Rocky基础知识1
2022-07-05 12:41:00 【51CTO】
1、用户
1)、管理员:root ,uid : 0
2)、普通用户:1-60000自动分配
a、系统用户:1-999(centos7以后),1-499(centos6以前)
b、登录用户:1000+(centos7以后),500+(centos6以前)
2、用户组
1)、管理员组:root ,gid : 0
2)、普通组:
a、系统组:1-999(centos7以后),1-499(centos6以前),对守护进程获取资源进行权限分配
b、普通组:1000+(centos7以后),500+(centos6以前),给用户使用
3、passwd文件格式
以:分割
第1字段:登录名(用户)
第2字段:密码
第2字段:UID
第2字段:GID
第2字段:用户描述
第2字段:家目录
第2字段:用户默认shell类型
4、shadow文件格式
以:分割
登录名
用户密码:一般用sha512加密
从1970年1月1日起到密码最近一次被更改的时间
密码再过几天可以被变更(0表示随时可被变更)
密码再过几天必须被变更(99999表示永不过期)
密码过期前几天系统提醒用户(默认为一周)
密码过期几天后帐号会被锁定
从1970年1月1日算起,多少天后帐号失效
例:生成随机10为密码
[[email protected]rocky8-1 <sub>] #cat /dev/urandom |tr -dc '[:alnum:][email protected]#$%^' |head -c10
[email protected] #DS
[[email protected] </sub>] #openssl rand -base64 9
aNcISeq/BYIA
[[email protected] <sub>] #mkpasswd
v64y%FPzt
[[email protected] </sub>] #mkpasswd -l 9 -c 2 -C 2 -d 2 -s 2
#5egg_6SV
#注:-l 9 代表长度(9位字符密码)
-c 2 代表小写字母 (2位小写字母)
-C 2 代表大写字母 (2为大写字母)
-d 2 代表数字 (2位数字)
-s 2 代表特殊符号 (2位特殊符号)
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
5、光盘自动挂载autofs
在使用linux中,我们有会这么一个神奇的目录,平时不存在,访问自动生成,然后
自动把光盘 挂载到此目录上,在centos7上都是/misc/cd/目录。
需要安装autofs服务:
安装完autofs后查看下服务是否开启,如果没开启,需要开启下
systemctl status autofs #查看autofs服务
systemctl start autofs #开启autofs
systemctl restart autofs #重启autofs
进入/misc/cd会惊奇的发现里边有光盘的文件了
[[email protected] ~] #cd /misc/cd/
[[email protected] cd] #ls
AppStream EFI isolinux media.repo
BaseOS images LICENSE TRANS.TBL
- 1.
- 2.
- 3.
- 4.
边栏推荐
猜你喜欢
Simply take stock reading notes (4/8)
Transactions on December 23, 2021
SAP UI5 视图里的 OverflowToolbar 控件
2021-12-22 transaction record
SAP self-development records user login logs and other information
激动人心!2022开放原子全球开源峰会报名火热开启!
函数传递参数小案例
【云原生】Nacos-TaskManager 任务管理的使用
将函数放在模块中
解决 UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xa2 in position 107
随机推荐
155. Minimum stack
A deep long article on the simplification and acceleration of join operation
Difference between JUnit theories and parameterized tests
How can non-technical departments participate in Devops?
逆波兰表达式
Kotlin variable
10 minute fitness method reading notes (3/5)
Yyds dry inventory JS intercept file suffix
How do e-commerce sellers refund in batches?
MySQL 巨坑:update 更新慎用影响行数做判断!!!
I'm doing open source in Didi
SAP UI5 DynamicPage 控件介绍
Transactions from January 14 to 19, 2022
RHCSA3
实现 1~number 之间,所有数字的加和
RHCSA4
从39个kaggle竞赛中总结出来的图像分割的Tips和Tricks
Why is your next computer a computer? Explore different remote operations
Setting up sqli lab environment
What if wechat is mistakenly sealed? Explain the underlying logic of wechat seal in detail