su

SU(1)                       General Commands Manual                      SU(1)



åå
       su - ã¦ã¼ã¶ ID ã¨ã°ã«ã¼ã ID ãå¤æ´ãã¦ã·ã§ã«ãèµ·åãã

æ¸å¼
       su [-flmp] [-c command] [-s shell] [--login] [--fast] [--preserve-
       environment] [--command=command] [--shell=shell] [-] [--help]
       [--version] [user [arg...]]

説æ
       ãã®ææ¸ã¯ããã¡ã³ããã³ã¹ããã¦ããªãã®ã§ãä¸æ£ç¢ºã»ä¸å®å¨ ãªå¯è½æ§ããããç¾å¨ã¯
       texinfo ææ¸ãæ£å¼ãªæå ±ã¨ãªã£ã¦ããã

       ãã®ããã¥ã¢ã«ãã¼ã¸ã¯ GNU ç su ã«ã¤ãã¦è¨è¿°ãããã®ã§ããã su
       ã¯ããã¦ã¼ã¶ã¼ãä¸æçã«ä»ã®ã¦ã¼ã¶ã«ãªãããã«ç¨ããããã su 㯠user ã®å®ã¦ã¼ã¶ã¼
       IDãå®å¹ã¦ã¼ã¶ã¼ IDãã°ã«ã¼ã IDãããã³æå±ã°ã«ã¼ã
       ã®æ¨©éãä¸ãã¦ã·ã§ã«ãèµ·åããããã user ãä¸ããããªãã£ãå ´åãããã©ã«ãã¯
       rootãããªãã¡ã¹ã¼ãã¼ã¦ã¼ã¶ã¼ã§ ãããå®è¡ãããã·ã§ã«ã¯ user
       ã®ãã¹ã¯ã¼ãã¨ã³ããªããé¸æããããããã«ä½ãæ¸ããã¦ããªãå ´å㯠/bin/sh ãå®è¡ãããã
       user ã«ãã¹ã¯ã¼ããããå ´åã«ã¯ã su ã¯ãã¹ã¯ã¼ããè¦æ±ããããã³ããã表示ããããã ã su
       ãå®è¡ããã®ãå®ã¦ã¼ã¶ã¼ ID 0 ï¼ã¹ã¼ãã¼ã¦ã¼ã¶ã¼ï¼ã®å ´åã«ã¯ãã¹ã¯ã¼ã
       èªè¨¼ã¯è¡ãããªãã

       su ã¯ããã©ã«ãã§ã¯ã«ã¬ã³ããã£ã¬ã¯ããªãå¤æ´ããªããã¾ã su 㯠ç°å¢å¤æ° `HOME'
       ããã³ `SHELL' ã user ã®ãã¹ã¯ã¼ãã¨ã³ããªã®å¤ã«ã»ãããããã¾ã user ã
       ã¹ã¼ãã¼ã¦ã¼ã¶ã¼ä»¥å¤ã®å ´åã«ã¯ãç°å¢å¤æ° `USER' 㨠`LOGNAME' ã user
       ã«ã»ãããããããã©ã«ãã§ã¯ãèµ·åãããã·ã§ã«ã¯ãã° ã¤ã³ã·ã§ã«ã«ã¯ãªããªãã

       ã²ã¨ã¤ä»¥ä¸ã®å¼ãæ° arg ãä¸ããããå ´åã«ã¯ããããã¯ã·ã§ã«ã«æ¸¡ããã
       å¼ãæ°ã¨ãã¦ã·ã§ã«ã«ä»å ãããã

       su 㯠/bin/sh ãããã¯ãã以å¤ã®ãããªãã·ã§ã«ãç¹å¥ã«ã¯æ±ããªã ï¼argv[0] ã«
       "-su" ãè¨å®ããããããã·ã§ã«ã«ã ã -c ã渡ããããã¨ã㣠ããã¨ã¯ããªãï¼ã

       syslog ã«å¯¾å¿ãã¦ããã·ã¹ãã ã§ã¯ã su ã失æããã¨ã syslog
       ã«ã¬ãã¼ãããããã«ã³ã³ãã¤ã«ããã㨠ãã§ããï¼æåãã¬ãã¼ãããããã«ãã§ããï¼ã

       ãã®ããã°ã©ã 㯠"wheel group" ã®æ©è½ï¼ su
       ã«ãã£ã¦ã¹ã¼ãã¼ã¦ã¼ã¶ã¼ã¢ã«ã¦ã³ãã«ãªããã¦ã¼ã¶ãå¶éããæ©è½ï¼ããµãã¼
       ãããªããããã¯å°å¶çãªã·ã¹ãã 管çèãä»ã®ã¦ã¼ã¶ã¼ã«ä¸å½ãªæ¨©åãæ¯ã
       ããªãããã«ããããã§ããã

   OPTIONS
       -c COMMAND, --command=COMMAND
              対話çãªã·ã§ã«ãèµ·åããã®ã§ã¯ãªããã·ã§ã«ã« -c ãªãã·ã§ã³ã¨ã¨ãã«
              COMMAND ï¼å®è¡ãããã³ãã³ãã©ã¤ã³ä¸è¡ï¼ã渡ãã

       -f, --fast
              ã·ã§ã«ã« -f ãªãã·ã§ã³ã渡ããããã¯ï¼ããããï¼ csh 㨠tcsh
              ã®ã¿ã§æå³ãæã¤ããããã®ã·ã§ã«ã§ã¯ -f
              ãªãã·ã§ã³ãæå®ããã¨ãã¹ã¿ã¼ãã¢ãããã¡ã¤ã«ï¼.cshrcï¼ãèªã¿è¾¼ã¾ãªãã
              Bourne ç³»ã®ã·ã§ã«ã§ã¯ -f
              ãªãã·ã§ã³ã¯ãã¡ã¤ã«åãã¿ã¼ã³ã®å±éãæå¶ãããããã¯å¤§æµã®å ´åã¯æã¾
              ããåä½ã§ã¯ãªãã ããã

       --help 使ãæ¹ã«é¢ããã¡ãã»ã¼ã¸ãæ¨æºåºåã«è¡¨ç¤ºããå®è¡æåãè¿ãã¦çµäºããã

       -, -l, --login
              ã·ã§ã«ããã°ã¤ã³ã·ã§ã«ã«ãããããªãã¡ä»¥ä¸ã®ãããªåãæ±ãããã:
              ãã¹ã¦ã®ç°å¢å¤æ°ã解é¤ããããã®ä¸ã§ `TERM'ã `HOME'ã `SHELL' ãåè¿°
              ã®ããã«è¨å®ãã `USER'ã `LOGNAME' ï¼ã¹ã¼ãã¼ã¦ã¼ã¶ã¼ã§ãã£ã¦ãï¼ãå
              ããåè¿°ã®ããã«è¨å®ãããç¶ã㦠`PATH' ãã³ã³ãã¤ã«æã®ããã©ã«ãå¤ã« è¨‐
              å®ããããã£ã¬ã¯ããªã user ã®ãã¼ã ãã£ã¬ã¯ããªã«å¤æ´ãããã·ã§ã«åã®åã« `-'
              ãä»å ããã·ã§ã«ã« ãã°ã¤ã³æã®ã¹ã¿ã¼ãã¢ãããã¡ã¤ã«ãèªã¾ããã

       -m, -p, --preserve-environment
              `HOME'ã `USER'ã `LOGNAME' ããã³ `SHELL' ç°å¢å¤æ°ãå¤æ´ããªãã
              /etc/passwd ã§æå®ããã¦ãã user ã®ã·ã§ã«ã§ã¯ãªããç¾å¨ã®ç°å¢å¤æ°
              `SHELL' ã§æå®ããã¦ããã·ã§ã«ãå®è¡ ããããã ã su
              ãå®è¡ããã¦ã¼ã¶ã¼ãã¹ã¼ãã¼ã¦ã¼ã¶ã§ã¯ãªãã user
              ã«ããã·ã§ã«ã®å®è¡ãå¶éããã¦ããå ´åã¯ãã®éãã§ã¯ãªããå®è¡ãå¶éã
              ãã¦ããã·ã§ã«ã¨ã¯ã /etc/shells ã«ãªã¹ãããã¦ããªãã·ã§ã«ããããã¯
              /etc/shells ãç¡ãå ´åã¯ã³ã³ãã¤ã«æã®æå®ãªã¹ãã«åå¨ããªãã·ã§ã«ã®ã
              ã¨ã§ããããã®ãªãã·ã§ã³ãå®è¡ããä½æ¥ã®ä¸é¨ã¯ --login ã¾ã㯠--shell
              ã«ãã£ã¦ãªã¼ãã¼ã©ã¤ããããã

       -s, --shell shell
              /etc/passwd ã«è¨è¿°ããã user ã®ã·ã§ã«ã®ä»£ããã« shell ãå®è¡ããã

       --version
              ãã¼ã¸ã§ã³æå ±ãæ¨æºåºåã«è¡¨ç¤ºããå®è¡æåãè¿ãã¦çµäºããã

GNU su 㧠wheel ã°ã«ã¼ãããµãã¼ãããªãããï¼Richard Stallmanï¼
       ã¨ããããå°æ°ã®ã¦ã¼ã¶ã¼ã«ãã£ã¦ãä»ã®ã¦ã¼ã¶ã¼ã«å¯¾ããå¨æ¨©ãææ¡ããã
       ã¨ãã試ã¿ããªããããã¨ããããä¾ãã° 1984 å¹´ã MIT AI ã©ãã®å°æ°ã®ã¦ã¼ ã¶ã¼ã¯
       Twenex ã·ã¹ãã ã®ãªãã¬ã¼ã¿ã¼ãã¹ã¯ã¼ãã®å¤æ´æ¨©éã強奪ãããã
       ãä»ã®ã¦ã¼ã¶ã¼ããç§å¿ãããã¨ã«æ±ºå®ããï¼ãã®éã«ã¯ç§ã¯ãã®ã¯ã¼ãã¿ã¼
       ã®è£ããããã«ã¼ãã«ã«ããããå½ã¦ã¦æ¨©éãåãè¿ããã¨ã«æåããããã ãããã Unix
       ã§ãã£ãããç§ã«ã¯ã©ãããã°ãããããããªãã£ãã ããï¼ã

       ããããªãããæã«ã¯å°å¶èãç§å¯ãæ¼ãããã®ã§ãããé常㮠su ã®ã¡ã«ã
       ãºã ã§ã¯ãä¸è¬ã¦ã¼ã¶ã¼ã®å´ã«ç«ã¤èã root ã®ãã¹ã¯ã¼ããç¥ãã°ãããã
       ä»ã®ã¦ã¼ã¶ã¼ã«ãç¥ããããã¨ãã§ãããããã "wheel group" æ©è½ã¯ãã
       ãä¸å¯è½ã«ããçµæã¨ãã¦å°å¶èéã®æ¨©éãå¼·åºãããã®ã«ãã¦ãã¾ãã

       ç§ã¯å¤§è¡ã®å´ã«ç«ã¤ãã®ã§ãããå°å¶çãªç«å ´ã«ã¯å対ãããããªãã¯ãã¹ã
       ã·ã¹ãã 管çèã®ããå£ã«å¾ããã¨ã«æ£ãã¦ããããç¥ããªããããã®å ´åã¯
       ã¾ããã®ãã¨èªèº«ãä¸æè°ã«æãã¹ãã§ã¯ãªãã ãããã



FSF                           GNU Shell Utilities                        SU(1)