GROUPMEMS

åç§°
大纲
æè¿°
é项
SETUP
éç½®æä»¶
æä»¶
åè§


åç§°

groupmems − ç¨æ·ä¸»ç»ç管çåæå

大纲

groupmems −a user_name | −d user_name | [−g group_name] | −l | −p

æè¿°

The groupmems command allows a user to administer their own group membership list without the requirement of superuser privileges. The groupmems utility is for systems that configure its users to be in their own name sake primary group (i.e., guest / guest).

Only the superuser, as administrator, can use groupmems to alter the memberships of other groups.

é项

groupmems å½ä»¤å¯ä»¥æ¥åçé项æï¼

−a, −−add user_name

Add a user to the group membership list.

If the /etc/gshadow file exist, and the group has no entry in the /etc/gshadow file, a new entry will be created.

−d, −−delete user_name

ä»ç»æåå表ä¸å é¤ç¨æ·ã

妿 /etc/gshadow æä»¶åå¨ï¼ç¨æ·å°ä¼è¢«ä»ç»æåå管çåä¸ç§»é¤ã

If the /etc/gshadow file exist, and the group has no entry in the /etc/gshadow file, a new entry will be created.

−g, −−group group_name

è¶çº§ç¨æ·å¯ä»¥æå®ä¿®æ¹åªä¸ªç»çç»æåå表ã

−h, −−help

ç°å®å¸®å©ä¿¡æ¯å¹¶éåºã

−l, −−list

ååºç»æåã

−p, −−purge

ä»ç»æåå表ä¸å é¤ææç¨æ·ã

If the /etc/gshadow file exist, and the group has no entry in the /etc/gshadow file, a new entry will be created.

−R, −−root CHROOT_DIR

Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory.

SETUP

The groupmems executable should be in mode 2770 as user root and in group groups. The system administrator can add users to group groups to allow or disallow them using the groupmems utility to manage their own group membership list.

$ groupadd −r groups

$ chmod 2770 groupmems

$ chown root.groups groupmems

$ groupmems −g groups −a gk4

éç½®æä»¶

å¨ /etc/login.defs 䏿å¦ä¸éç½®åéï¼å¯ä»¥ç¨æ¥æ´æ¹æ¤å·¥å·çè¡ä¸ºï¼

MAX_MEMBERS_PER_GROUP (number)

æ¯ä¸ªç»æ¡ç®çæå¤§æåæ°ãè¾¾å°æå¤§å¼æ¶ï¼å¨ /etc/group å¼å§ä¸ä¸ªæ°æ¡ç®(è¡)(使ç¨åæ ·çåç§°ï¼åæ ·çå¯ç ï¼åæ ·ç GID)ã

é»è®¤å¼æ¯ 0ï¼æå³çç»ä¸çæåæ°æ²¡æéå¶ã

æ¤åè½(åå²ç»)å许éå¶ç»æä»¶ä¸çè¡é¿åº¦ãè¿å¯¹äºç¡®ä¿ NIS ç»çè¡æ¯é¿äº 1024 å符ã

妿è¦å¼ºå¶è¿ä¸ªéå¶ï¼å¯ä»¥ä½¿ç¨ 25ã

注æï¼åå²ç»å¯è½ä¸åææå·¥å·çæ¯æ(çè³å¨ Shadow å·¥å·éä¸- )ãæ¨ä¸åºè¯¥ä½¿ç¨è¿ä¸ªåéï¼é¤éççéè¦ã

æä»¶

/etc/group

ç»è´¦æ·ä¿¡æ¯ã

/etc/gshadow

å®å¨ç»è´¦æ·ä¿¡æ¯

åè§

chfn(1), chsh(1), passwd(1), groupadd(8), groupdel(8), useradd(8), userdel(8), usermod(8).