当前位置:网站首页>rhcsa笔记六
rhcsa笔记六
2022-07-23 15:55:00 【zyfpkp】
1.linux中用户的类型
分为三类:
超级用户——用户名为root,它具有一切权限,只有进行系统维护(例如:建立用户等)或其他必要
情形下才用超级用户登录,以避免系统出现安全问题。
系统用户(伪用户)——是Linux系统正常工作所必需的用户。主要是为了满足相应的系统进程对
文件属主的要求而建立的,例如:bin、daemon、adm、lp等用户。系统用户不能用来登录。
普通用户——是为了让使用者能够使用Linux系统资源而建立的,我们的大多数用户属于此类。
linux中用户组的类型
分为两类:
基本组(私有组):建立账户时,若没有指定账户所属的组,系统会建立一个和用户名相同的组,这 个组就是基本组。
附加组(公有组):可以容纳多个用户,组中的用户都具有组所拥有的权利。
linux中存储用户信息的文件是哪个?且其中的字段是什么意思
/etc/passwd(用户账户文件,所有账户都可以访问)总计7段,格式为如下:
用户名:密码:UID:GID:账户信息:账户目录:Shell类型

/etc/shadow(用户密码文件,root才可以访问),总计9段,格式如下:
用户名:密码:最后一次修改时间的天数:两次修改密码最小间隔天数:多少天后需要再次修改密码:从发出警告到密码正式失效的天数:禁止登陆前用户名还有效的天数:用户被禁止登陆的时间:标志字段,无意义

linux中存储组信息的文件是哪个?且其中的字段是什么意思?
/etc/group(用户组文件,所有账户都可以访问),总计4段,格式如下:
用户组名称:组密码:GID:组成员

2.创建下列用户、组和组成员资格:
1.创建名为 sysmgrs 的组
2.创建用户 natasha 同时指定sysmgrs作为natasha的附加组
3.创建用户 harry 同时指定 sysmgrs作为harry的附加组
4.创建用户 sarah 指定shell类型为/sbin/false(无权访问系统上的交互式 shell)
且不是 sysmgrs 的成员

5.设置natasha 、 harry 和 sarah 的密码都是 123

6.创建用户lockuser, 并指定家目录为/home/lock, 然后锁定该用户

7.创建用户limituser, gid为1555,userid为1666, 让其密码在10天后过期
![]()



8.解锁lockuser, 并设定下次登录时必须修改密码

9.让natasha具备修改 harry密码的权限(sudo)![]()


10. 创建用户testuser并设置密码,修改用户名为normaluser



11.删除lockuser


3.创建文件,并赋予权限611(两种方式,一种guoa,一种nnn)

4.创建目录,并赋予权限755(两种方式,一种guoa,一种nnn)



![]()
5.创建文件,并将文件的属主和属组修改其他用户

6.设置suid,为文件设置suid(两种方式 u+s和nnnn)的方式

7.设置sgid, 为文件设置sgid(两种方式 g+s和nnnn)的方式

8.设置sbit,为目录设置sbit(两种方式 o+t和nnnn)的方式

9.创建文件,查询文件的acl
为文件设置acl 用户为testuser1 权限为 rwx

为文件设置acl的mask: 权限为r-x

边栏推荐
- 多线程编程
- Data crawling and display of e-commerce platform based on scratch
- 几种运维工具的对比
- LeetCode_ Dynamic programming_ Medium_ 120. Triangle minimum path sum
- Role definition in USB type-C PD CC logic chip
- QT multithread instance and the fifth parameter of connect [easy to understand]
- leetcode:剑指 Offer II 115. 重建序列【图论思维 + 入度考虑 + 拓扑排序】
- How the lock issued by go works (combined with the source code)
- 【215】gin框架连接mysql数据库
- c语言--通讯录的实现与ScreenToGif
猜你喜欢

Sentinel 安装图解

Did not find the necessary patch file 'newopui.pak'?

Static distribution and dynamic distribution in trust

go语言中的内存对齐是如何优化程序效率的?

本周一问 | Vivado 综合阶段什么约束生效?

CSDN custom T-shirts are waiting for you to get, and the benefits of new programmer are coming!

The loss of training and testing does not decline, and the accuracy is extremely low

Keras之二分类问题

Activity Registration: how to quickly start the open source tapdata live data platform on a zero basis?
![[216] go language standard library package name](/img/14/bd12be4204ed44e114b1311f08c9e3.jpg)
[216] go language standard library package name
随机推荐
MySQL foundation and performance optimization
【通俗易懂】关系模式范式分解教程 3NF与BCNF口诀!小白也能看懂「建议收藏」
MySQL field modification
Trust guessing numbers game
Sentinel introduction and microservice integration
机器学习(9)——特征工程(3)(补充)
There is an error prompt when configuring the GOM engine login: the necessary patch file is not found!
Microservice avalanche problems and Solutions
What about the reason why GOM and GEE set up a black screen and the fact that individual equipment maps are not displayed?
aspose的仓库地址
吉时利静电计在新能源电池测试方案的应用
go中的協程原理詳解
Chi square distribution, analysis of variance
Explanation of PPPoE protocol and analysis of Wireshark packet capturing during dialing
curl命令详解[通俗易懂]
leetcode:剑指 Offer II 115. 重建序列【图论思维 + 入度考虑 + 拓扑排序】
Common work operations
Sentinel 安装图解
JVM – 彻底理解打破双亲委派机制
jps详解