当前位置:网站首页>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)
检测用户和组配置文件是否有误
边栏推荐
- Depth first search - DFS (burst search)
- Leetcode-21 combines two ordered linked lists
- 力扣每日一题-第32天-589.N×树的前序遍历
- D. Yet Another Minimization Problem
- After studying 11 kinds of real-time chat software, I found that they all have these functions
- How to manage 1000 anchors by one person?
- R语言caTools包进行数据划分、scale函数进行数据缩放、class包的knn函数构建K近邻分类器、table函数计算混淆矩阵
- Weekly recommended short videos: be alert to the confusion between "phenomena" and "problems"
- R language ggplot2 visualization: gganimate creates a dynamic histogram animation (GIF), and displays the histogram and enter step by step along a given dimension in the animation_ Growth function and
- [noip2015] jumping stone
猜你喜欢
The 13th simulation problem of the single chip microcomputer provincial competition of the Blue Bridge Cup
6款红黄黑榜摄像头评测:谁最安全?谁画质好?从此让你不再踩雷
Must see, time series analysis
ACM MM 2022视频理解挑战赛视频分类赛道冠军AutoX团队技术分享
主成分计算权重
Mise en place d'une plate - forme générale de surveillance et d'alarme, quelles sont les conceptions nécessaires dans l'architecture?
搭建一个通用监控告警平台,架构上需要有哪些设计
Weekly recommended short videos: be alert to the confusion between "phenomena" and "problems"
Leetcode-128 最长连续序列
PTA year of birth
随机推荐
Database - MySQL advanced SQL statement (I)
[acnoi2022] color ball
Go Technology Daily (2022-02-14) - go language slice interview real questions 8 consecutive questions
Search 2D matrix 2
R语言使用epiDisplay包的followup.plot函数可视化多个ID(病例)监测指标的纵向随访图、使用n.of.lines参数指定显示的病例数
Introduction to easyclick database
1380. Lucky number in matrix / 1672 Total assets of the richest customers
2020,最新手机号码手机验证正则表达式,持续更新
C operator overloads the query table
用WPF写一款开源方便、快捷的数据库文档查询、生成工具
C language learning notes: type definition typedef and declaration external CSDN creation punch in
Livedata postvalue will "lose" data
How does factor analysis calculate weights?
Xia CaoJun ffmpeg 4.3 audio and video foundation to engineering application
Three.js学习-相机Camera的基本操作(了解向)
Memo - about C # generating barcode for goods
Operation of cmake under win
Computer network interview assault
3、《创建您自己的NFT集合并发布一个Web3应用程序来展示它们》在本地铸造 NFT
After studying 11 kinds of real-time chat software, I found that they all have these functions