pwconv

PWCONV(8)                       ç³»ç»ç®¡çå½ä»¤                       PWCONV(8)



å称
       pwconv, pwunconv, grpconv, grpunconv - å¨å½±åå¯ç åç»ä»¥åå¶å®ç´æ¥è½¬æ¢

大纲
       pwconv [é项]

       pwunconv [é项]

       grpconv [é项]

       grpunconv [é项]

æè¿°
       pwconv å½ä»¤ä½¿ç¨ passwd 以åå¯é并已ç»åå¨ç shadow æ¥å建 shadowã

       pwunconv å½ä»¤ä½¿ç¨ passwd å shadow æ¥å建 passwdï¼ç¶åç§»é¤ shadowã

       grpconv ä» group åå¯è½åå¨ç gshadow å建 gshadowã

       grpunconv å½ä»¤ä» group å gshadow å建 groupï¼ç¶åç§»é¤ gshadowã

       è¿å个ç¨åºé½å¯ä»¥æä½æ®éæå½±åå¯ç åç»æ件ï¼/etc/passwd, /etc/group,
       /etc/shadow å /etc/gshadowã

       转æ¢åï¼æ¯ä¸ªç¨åºé½ä¼è·åéè¦çéãpwconv å grpconv ä¹ç±»ä¼¼ãé¦åå é¤ï¼å‐
       å¨äºå¨å½±åæ件ä¸ï¼ä½å¨ä¸»æ件ä¸å´æ²¡æçæ¡ç®ï¼ç¶åï¼æ´æ°å¨ä¸»æ件ä¸‐
       ä¸ä½¿ç¨“x”ä½ä¸ºå¯ç çå½±åæ¡ç®ï¼ä¼æ·»å ææ缺失çæ¡ç®ï¼æåï¼å°ä¸»æ件ä¸‐
       çå¯ç æ¿æ¢ä¸º“x”ãè¿ä¸¤ä¸ªå·¥å·å¯ä»¥ç¨äºåå§è½¬æ¢ä»¥åæ ¹æ®æå¨ç¼è¾ç主æ件æ´æ°å½±å‐
       æ件ã

       pwconv å /etc/shadow æ·»å æ¡ç®æ¶ï¼å°ä½¿ç¨/etc/login.defs ä¸ç
       PASS_MIN_DAYS, PASS_MAX_DAYS å PASS_WARN_AGE å¼ã

       pwunconv å grpunconv ä¸æ¤ç±»ä¼¼ã主æ件ä¸çå¯ç ä¼æ ¹æ®å½±å‐
       æ件æ´æ°ãå¨ä¸»æ件ä¸åå¨ï¼ä½ä¸å¨å½±åæ件ä¸çæ¡ç®åç¬çä¸ãæåï¼ç§»é¤å½±å‐
       æ件ãä¸äºå¯ç å¹´é¾ä¿¡æ¯ä¼å 为 pwunconv è丢失ãå®åªè½¬æ¢å®å¯ä»¥è½¬æ¢çã

é项
       pwconv, pwunconv, grpconv å grpunconv å½ä»¤å¯ä»¥æ¥åçé项æï¼

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

       -R, --root CHROOT_DIR
           Apply changes in the CHROOT_DIR directory and use the configuration
           files from the CHROOT_DIR directory.

缺é·
       å¨ passwd æ group æ件ä¸æé误(æ¯å¦ï¼æéå¤æ¡ç®)å¯è½ä¼é æè¿äºç¨åºæ‐
       »å¾ªç¯æè以å¥æªçæ¹å¼å¤±è´¥ãå¨è½¬æ¢èªï¼æ转æ¢å°å½±åå¯ç æç»æ件åï¼è¯·è¿è¡
       pwck å grpck æ¥ä¿®æ£æ¤ç±»é误ã

éç½®æ件
       /etc/login.defs ä¸çå¦ä¸éç½®åéæ¹å grpconv å grpunconv çè¡ä¸ºï¼

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

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

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

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

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

       /etc/login.defs ä¸çå¦ä¸éç½®åéæ¹å pwconv çè¡ä¸ºï¼

       PASS_MAX_DAYS (number)
           ä¸ä¸ªå¯ç å¯ä»¥ä½¿ç¨çæ大天æ°ãå¦æå¯ç æ¯è¿æ§ï¼å°ä¼å¼ºè¿«æ´æ¹å¯ç ãå¦æä¸æå®ï¼å°±åå®ä¸º
           -1ï¼è¿ä¼ç¦ç¨è¿ä¸ªéå¶ã

       PASS_MIN_DAYS (number)
           两次æ´æ¹å¯ç æ¶é´çæå°é´éãå°ä¼æç»ä»»ä½æ©äºæ‐
           ¤çæ´æ¹å¯ç çå°è¯ãå¦æä¸æå®ï¼åå®ä¸º -1ï¼å°ä¼ç¦ç¨è¿ä¸ªéå¶ã

       PASS_WARN_AGE (number)
           å¯ç è¿æä¹åç»åºè¦åç天æ°ã0 表示åªæåªå¨è¿æçå½å¤©è¦åï¼è´å¼è¡¨ç¤ºä¸è‐
           ¦åãå¦æ没ææå®ï¼ä¸ä¼ç»è¦åã

æ件
       /etc/login.defs
           Shadow å¯ç å¥ä»¶éç½®ã

åè§
       grpck(8), login.defs(5), pwck(8).



shadow-utils 4.7                  2019-07-31                         PWCONV(8)