如何搭建一个简单的网站,哪个网站可以学做咸菜,品牌网站首页设计,wordpress 耗资源linux命令之groupadd
1.groupadd介绍
linux命令groupadd是用来创建新的用户组#xff0c;用户组信息会被添加到系统文件(/etc/group)中。
2.groupadd用法
groupadd [参数] GroupName groupadd常用参数 参数说明-g指定用户组的gid号-r创建系统工作组-f如果组已经存在则成功…linux命令之groupadd
1.groupadd介绍
linux命令groupadd是用来创建新的用户组用户组信息会被添加到系统文件(/etc/group)中。
2.groupadd用法
groupadd [参数] GroupName
groupadd常用参数 参数说明-g指定用户组的gid号-r创建系统工作组-f如果组已经存在则成功退出
3.实例
3.1.创建普通用户组
命令
groupadd aa
[rootrhel77 ~]# groupadd aa
[rootrhel77 ~]# cat /etc/group | grep aa
aa:x:1129:
[rootrhel77 ~]# 默认普通用户组gid的范围可以在/etc/login.defs文件查看
[rootrhel77 ~]# cat /etc/login.defs | grep ^GID
GID_MIN 1000
GID_MAX 60000
[rootrhel77 ~]# 3.2.创建指定gid号的普通用户组
命令
groupadd -g 1200 bb
[rootrhel77 ~]# groupadd -g 1200 bb
[rootrhel77 ~]# cat /etc/group | grep bb
bb:x:1200:
[rootrhel77 ~]# 3.3.创建系统账户组
命令
groupadd -r aa
[rootrhel77 ~]# groupadd -r aa
[rootrhel77 ~]# cat /etc/group | grep aa
aa:x:981:
[rootrhel77 ~]# 默认系统用户组gid的范围可以在/etc/login.defs文件查看
[rootrhel77 ~]# cat /etc/login.defs | grep ^SYS_GID
SYS_GID_MIN 201
SYS_GID_MAX 999
[rootrhel77 ~]# 3.4.创建指定gid号的系统账户组
命令
groupadd -r -g 210 aa
[rootrhel77 ~]# groupadd -r -g 210 aa
[rootrhel77 ~]# cat /etc/group | grep aa
aa:x:210:
[rootrhel77 ~]# 3.5.创建已经存在的系统账户组
命令
groupadd -f -r -g 220 aa
[rootrhel77 ~]# cat /etc/group | grep aa
aa:x:210:
[rootrhel77 ~]# groupadd -f -r -g 220 aa
[rootrhel77 ~]# cat /etc/group | grep aa
aa:x:210:
[rootrhel77 ~]#