GRPCK

å称
大纲
æè¿°
é项
éç½®æ件
æ件
éåºå¼
åè§


å称

grpck − æ£æ¥ç»æ件çå®æ´æ§

大纲

grpck [é项] [group shadow ]]

æè¿°

The grpck command verifies the integrity of the groups information. It checks that all entries in /etc/group and /etc/gshadow have the proper format and contain valid data. The user is prompted to delete entries that are improperly formatted or which have other uncorrectable errors.

æ£æ¥ç项ç®æï¼

• æ£ç¡®çå段æ°

• ä¸ä¸ªå¯ä¸ä¸ææçç»å

• ææçç»æ è¯ç¬¦ (ä» /etc/group)

• ææçæåå 管çå å表ã

• a corresponding entry in the /etc/gshadow file (respectively /etc/group for the gshadow checks)

The checks for correct number of fields and unique group name are fatal. If an entry has the wrong number of fields, the user will be prompted to delete the entire line. If the user does not answer affirmatively, all further checks are bypassed. An entry with a duplicated group name is prompted for deletion, but the remaining checks will still be made. All other errors are warnings and the user is encouraged to run the groupmod command to correct the error.

The commands which operate on the /etc/group and /etc/gshadow files are not able to alter corrupted or duplicated entries. grpck should be used in those circumstances to remove the offending entries.

é项

−r å −s é项ä¸è½èå使ç¨ã

grpck å¯ä»¥æ¥åçé项æï¼

−h, −−help

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

−r, −−read−only

Execute the grpck command in read−only mode. This causes all questions regarding changes to be answered no without user intervention.

−R, −−root CHROOT_DIR

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

−s, −−sort

æ ¹æ® GID å¨ /etc/groupå /etc/gshadow ä¸è¿è¡æåºã

By default, grpck operates on /etc/group and /etc/gshadow. The user may select alternate files with the group and shadow parameters.

éç½®æ件

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

MAX_MEMBERS_PER_GROUP (number)

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

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

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

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

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

æ件

/etc/group

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

/etc/gshadow

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

/etc/passwd

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

éåºå¼

grpck å¯ä»¥è¿åå¦ä¸å¼ï¼

0

æå

1

æ æçå½ä»¤è¯æ³

2

ä¸ä¸ªæå¤ä¸ªåæçç»æ¡ç®

3

æ æ³æå¼ç»æ件

4

æ æ³éå®ç»æ件

5

æ æ³æ´æ°ç»æ件

åè§

group(5), groupmod(8), gshadow(5),passwd(5), pwck(8), shadow(5).