当前位置:网站首页>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.
边栏推荐
- Wechat enterprise payment to change access, open quickly
- Comprehensive upgrade of Taobao short video photosynthetic platform
- Kotlin函数
- MySQL giant pit: update updates should be judged with caution by affecting the number of rows!!!
- 将函数放在模块中
- SAP SEGW 事物码里的 Association 建模方式
- 跨平台(32bit和64bit)的 printf 格式符 %lld 输出64位的解决方式
- Kotlin process control and circulation
- I'm doing open source in Didi
- leetcode:221. 最大正方形【dp状态转移的精髓】
猜你喜欢
Kotlin variable
Introduction to sap ui5 flexiblecolumnlayout control
HiEngine:可媲美本地的云原生内存数据库引擎
A few years ago, I outsourced for four years. Qiu Zhao felt that life was like this
滴滴开源DELTA:AI开发者可轻松训练自然语言模型
MySQL 巨坑:update 更新慎用影响行数做判断!!!
Kotlin变量
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
Transactions from January 14 to 19, 2022
国内市场上的BI软件,到底有啥区别
MySQL 巨坑:update 更新慎用影响行数做判断!!!
jxl笔记
Oppo Xiaobu launched Obert, a large pre training model, and promoted to the top of kgclue
Language model
Shi Zhenzhen's 2021 summary and 2022 outlook | colorful eggs at the end of the article
Kotlin variable
SAP UI5 DynamicPage 控件介紹
How to connect the API interface of Taobao open platform (super detailed)
SAP UI5 视图里的 OverflowToolbar 控件
激动人心!2022开放原子全球开源峰会报名火热开启!
Taobao short video, why the worse the effect
Taobao order amount check error, avoid capital loss API
Transactions from December 29, 2021 to January 4, 2022
OPPO小布推出预训练大模型OBERT,晋升KgCLUE榜首
阿里云SLB负载均衡产品基本概念与购买流程
SAP UI5 DynamicPage 控件介绍
RHCSA1