Linux系统配置及服务管理_第03章用户管理
2018-01-20 09:51
316 查看
大家好,我是霸王卸甲,昨天因为工作上的事情,忘记更了,今天上午补上昨天的文章,每周周六周日停更两天。
1.用户/组基本概念: ①概念:Users and groups:
. Every process (running program) on the system runs as a particular user.
. Every file is owned by a particular user.
. Access to files and directories are restricted by user.
. The user associated with a running process determines the files and directories accessible to that process.
②查看当前登录的用户信息:
2.用户/组管理:首先给大家讲的是用户如下图
然后是用户组:用户组又分为基本组和附加组
1创建用户
#useradd testA
#useradd testB
2 查看用户UID/GID
#cat /etc/passwd
testA:X:1000:1000 (UID:GID-基本组ID)
testB:X:1001:1001
3 创建个新组,查询组ID为1002.
#groupadd groupT
#cat /etc/group
goutpT::1002:
4 请用“usermod -g”修改用户的基本组为1002.
#usermod -g groupT testA
5 查询用户GID,由1000,更改为1002
#cat /etc/passwd
testA:X:1000:1002 (UID:GID-基本组ID)
testB:X:1001:1001
附加组:1创建用户
#useradd testA
#useradd testB
2 查看组信息
#cat /etc/group
testA::1001:
testB::1002:
3 将用户加入其他组。
语法 -G 附加组 组名 用户名
usermod -G testB testA
4 查看附加组的成员
#cat /etc/group
testA::1001:
testB::1002:testA(用户)
提权(了解):这个部分大家了解下就可以了、
1.用户/组基本概念: ①概念:Users and groups:
. Every process (running program) on the system runs as a particular user.
. Every file is owned by a particular user.
. Access to files and directories are restricted by user.
. The user associated with a running process determines the files and directories accessible to that process.
②查看当前登录的用户信息:
③查看文件的owner:[root@tianyun ~]# ll /home/ drwx------. 4 alice alice 4096 Jun 2 15:59 alice drwx------. 2 root root 16384 Jun 1 23:09 lost+found drwxr-xr-x 2 root root 4096 Jun 2 15:33 tianyun ④查看运行进程的username:USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 19360 1536 ? Ss 13:29 0:00 /sbin/init root 2 0.0 0.0 0 0 ? S 13:29 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S 13:29 0:00 [migration/0] root 4 0.0 0.0 0 0 ? S 13:29 0:00 [ksoftirqd/0]
2.用户/组管理:首先给大家讲的是用户如下图
然后是用户组:用户组又分为基本组和附加组
1创建用户
#useradd testA
#useradd testB
2 查看用户UID/GID
#cat /etc/passwd
testA:X:1000:1000 (UID:GID-基本组ID)
testB:X:1001:1001
3 创建个新组,查询组ID为1002.
#groupadd groupT
#cat /etc/group
goutpT::1002:
4 请用“usermod -g”修改用户的基本组为1002.
#usermod -g groupT testA
5 查询用户GID,由1000,更改为1002
#cat /etc/passwd
testA:X:1000:1002 (UID:GID-基本组ID)
testB:X:1001:1001
附加组:1创建用户
#useradd testA
#useradd testB
2 查看组信息
#cat /etc/group
testA::1001:
testB::1002:
3 将用户加入其他组。
语法 -G 附加组 组名 用户名
usermod -G testB testA
4 查看附加组的成员
#cat /etc/group
testA::1001:
testB::1002:testA(用户)
提权(了解):这个部分大家了解下就可以了、
**今天的文章就到这里了,感谢大家的支持,在这里给大家道个歉,因为本人感冒,文章内容结构会整理的不太好,请大家多多包容,谢谢大家,明天见。**
相关文章推荐
- Linux系统中管理用户和用户组的相关配置文件简介
- 【解决】SharePoint 2013用户配置服务管理中新增同步连接失败
- Linux系统配置及服务管理_第05章高级权限
- Linux系统下关于用户和组的配置管理
- Linux系统配置及服务管理_第01章系统部署
- 配置Tomcat,允许指定身份用户管理服务(Linux平台)
- Linux系统配置及服务管理_第01章系统部署 (第二小节初识shell)
- Linux系统下关于用户和组的配置管理
- linux系统安装ftp服务并配置ftp用户
- Linux下配置Tomcat允许指定身份用户管理服务
- 《小猪CMS(PigCms)多用户微信营销服务平台系统V6.1完美破解至尊版带微用户管理CRM+微信支付》
- 常规网络管理、配置及系统服务全攻略
- SVN服务 用户的权限配置
- RPC(管理端口的服务)NFS软件 NFS配置文件 简单介绍
- User Profile Synchronization Service Gets Stuck on Starting 用户配置文件同步服务卡在“启动中”的解决方案
- 2 weekend110的zookeeper的原理、特性、数据模型、节点、角色、顺序号、读写机制、保证、API接口、ACL、选举、 + 应用场景:统一命名服务、配置管理、集群管理、共享锁、队列管理
- 以用户友好的方式管理Windows服务的工具
- centos samba 服务本地用户配置
- Linux系统下用户与用户组管理