新建组

groupadd
-g, --gid GID
The numerical value of the group′s ID. This value must be unique, unless the -o option is used. The value
must be non-negative. The default is to use the smallest ID value greater than 999 and greater than every
other group. Values between 0 and 999 are typically reserved for system accounts.
eg:
[root@i175 ~]# cat /etc/group|grep 999
db2iadm1:x:999:
[root@i175 ~]# usermod -a -G db2iadm1(附加组) db2inst1(login)
[root@i175 ~]# cat /etc/group|grep 999
db2iadm1:x:999:db2inst1


1.
参考:
db2inst1:x:1004:999::/home/db2inst1:/bin/bash
db120 ~ # cat /etc/group|grep 999
db2iadm1:x:999:db2inst1
执行:
[root@i175 ~]# groupadd -g 999 db2iadm1
[root@i175 ~]# usermod -u 1004 -g 999 db2inst1
2.
memcached:x:102:2:added by portage for memcached:/dev/null:/sbin/nologin
nagios:x:103:119:added by portage for nagios-plugins:/var/nagios/home:/bin/bash
s212 ~ # cat /etc/group|grep 120
nginx:x:120:
s212 ~ # tail /etc/group|grep 2 ?没有找到???
sshd:x:22:
ntp:x:123:
ssmtp:x:122:
crontab:x:121:
nginx:x:120:

你可能感兴趣的:(新建)