当前位置:网站首页>11、用户、组和权限(1)
11、用户、组和权限(1)
2022-07-01 18:36:00 【51CTO】
1、Linux安全模型
3A(authentication、authorization、accouting aduition):认证、授权、审计
用户
Linux中每个用户是通过User ID(UID)来唯一表示的
管理员root: uid 为0
普通用户:1-60000自动分配
系统用户:1-499(centos6) 1-999(centos7) 用于守护进程获取资源进行权限分配
登录用户:500+(centos6) 1000+(centos7)给普通用户进行交互式登录使用
用户组
Linux中可以将一个用户或多个用户加入到用户组中,用户组也具有GID (group id)
管理员组root:0
普通组:
系统组:1-499(centos6) 1-999(centos7) 用于守护进程获取资源进行权限分配
普通组:500+(centos6) 1000+(centos7)给用户使用
用户与组的关系
用户的主要组:用户必须属于一个且只有一个主组,默认创建用户时会自动创建和用户名同名的组,作为用户的主要组,由于此组中只有一个用户,也为私有组;
附加组:一个用户可以属于多个附加组;

安全上下文
Linux安全上下文context:运行中的程序,即进程,以进程发起者的身份运行,进程能够读取资源的权限取决于进程运行者的身份;
2、用户和组的配置文件
用户配置文件
/etc/passwd (用户信息,原unix系统用户密码都存放在此) /etc/shadow(存放用户的密码相关信息)
/etc/passwd 文件格式


/etc/shadow 文件格式


加密算法:一般采用sha512,更改密码的算法:authconfig --passalgo=sha256 --update
随机密码生成:


group文件格式

群组名称 群组密码 群组id 已当前组为附加组得已用户列表
gshadow 文件格式

群组名称 群去密码 组管理员列表 以当前组为附加组的用户列表:多个用户建用逗号分隔;
文件操作(pwck grpck)
检测用户和组配置文件是否有误
边栏推荐
- Regular expression
- Opencv map reading test -- error resolution
- 如何运营好技术相关的自媒体?
- PTA year of birth
- [today in history] February 15: Pascal's father was born; YouTube was founded; Kotlin language comes out
- Thread forced join, thread forced join application scenarios
- Sum of three numbers
- 1380. Lucky number in matrix / 1672 Total assets of the richest customers
- 力扣每日一题-第32天-1232. 缀点成线
- Blue Bridge Cup real question: score statistics
猜你喜欢

Sum of three numbers

Calculation of intersection of two line segments

OpenAI|视频预训练 (VPT):基于观看未标记的在线视频的行动学习

Xia CaoJun ffmpeg 4.3 audio and video foundation to engineering application

After studying 11 kinds of real-time chat software, I found that they all have these functions

LiveData postValue会“丢”数据

Halcon image calibration enables subsequent image processing to become the same as the template image

Blue Bridge Cup real topic: the shortest circuit

Case study on comprehensive competitiveness of principal components

GAMES202作业0-环境搭建过程&解决遇到的问题
随机推荐
Computer network interview assault
About enterprise middle office planning and it architecture microservice transformation
[CF559E]Gerald and Path
The R language uses the tablestack function of epidisplay package to make statistical summary tables (descriptive statistics based on the grouping of target variables, hypothesis testing, etc.). If th
Halcon image calibration enables subsequent image processing to become the same as the template image
The ultimate version of the 13th simulation of the single chip microcomputer provincial competition of the Blue Bridge Cup
关于企业中台规划和 IT 架构微服务转型
t10_ Adapting to Market Participantsand Conditions
Implement a Prometheus exporter
Vue uses keep alive to cache page optimization projects
NSI packaging script add file details
R语言ggplot2可视化:可视化折线图、使用labs函数为折线图添加自定义的Y轴标签信息(customize y axis label)
Leetcode203 移除链表元素
540. Single element in ordered array / 1684 Count the number of consistent strings
Navicat Premium 15 永久破解和2021版本最新IDEA破解(亲测有效)
必看,时间序列分析
隐私沙盒终于要来了
Halcon图片标定,使得后续图片处理过后变成与模板图片一样
Privacy sandbox is finally coming
[Chongqing Guangdong education] basic psychology reference materials of Tianjin Normal University