当前位置:网站首页>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)
检测用户和组配置文件是否有误
边栏推荐
- Lumiprobe Lumizol RNA 提取试剂解决方案
- [today in history] February 15: Pascal's father was born; YouTube was founded; Kotlin language comes out
- Lumiprobe non fluorescent alkyne EU (5-ethynyluridine)
- [source code analysis] NVIDIA hugectr, GPU version parameter server - (1)
- Five degrees easy chain enterprise app is newly upgraded
- Facebook聊单,SaleSmartly有妙招!
- Rust language - cargo, crates io
- Blue Bridge Cup real topic: the shortest circuit
- [acnoi2022] color ball
- How does factor analysis calculate weights?
猜你喜欢

Localization through custom services in the shuttle application

用WPF写一款开源方便、快捷的数据库文档查询、生成工具

每周推荐短视频:警惕“现象”与“问题”相互混淆

What impact will multinational encryption regulation bring to the market in 2022

Cloud computing - make learning easier
![[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)](/img/92/f3a70e7086aeedf41eea3eef98b5aa.jpg)
[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)

Privacy sandbox is finally coming

Data query language (DQL)

How to manage 1000 anchors by one person?

必看,时间序列分析
随机推荐
Lumiprobe Lumizol RNA 提取试剂解决方案
Data query language (DQL)
Write it down once Net travel management background CPU Explosion Analysis
D. Yet Another Minimization Problem
Qt中的QFile读写文件操作
Blue Bridge Cup real topic: the shortest circuit
R语言使用epiDisplay包的aggregate函数将数值变量基于因子变量拆分为不同的子集,计算每个子集的汇总统计信息
[noip2015] jumping stone
R language ggplot2 visualization: visualize the line graph and add customized Y-axis label information to the line graph using the labels function
必看,时间序列分析
解决方案:可以ping别人,但是别人不能ping我
实现一个Prometheus exporter
1、《创建您自己的NFT集合并发布一个Web3应用程序来展示它们》什么是NFT
R语言caTools包进行数据划分、scale函数进行数据缩放、class包的knn函数构建K近邻分类器、table函数计算混淆矩阵
Navicat Premium 15 永久破解和2021版本最新IDEA破解(亲测有效)
Lumiprobe 双功能交联剂丨Sulfo-Cyanine5 双-NHS 酯
R language epidisplay package ordinal or. The display function obtains the summary statistical information of the ordered logistic regression model (the odds ratio and its confidence interval correspo
A database editing gadget that can edit SQLite database. SQLite database replaces fields. SQL replaces all values of a field in the database
Lumiprobe 生物分子定量丨QuDye 蛋白定量试剂盒
Sanfeng cloud 0215 I often use