»ç¿ëÀÚ °ü¸®Çϱâ

 

    ¸®´ª½ºÀÇ Æ¯Â¡ÀÎ Multiaccess ¿Í MultitaskingÀ» Çϱâ À§ÇÑ ±âº» ½Ã½ºÅÛÀÌ ´ÙÁß »ç¿ëÀÚÀÇ Áö¿øÀÌ´Ù. ÀÌ·± Ư¡À¸·Î ¸®´ª½º¿¡¼­´Â ¿ì¸®°¡ ÇÏÀÌÅÚÀ̳ª ³ª¿ì´©¸® Åë½ÅÀ» »ç¿ëÇϵíÀÌ loginÀ̶ó´Â »ç¿ëÀÚ °ËÁõ ÀýÂ÷¸¦ °ÅÃļ­ ½Ã½ºÅÛ¿¡ µé¾î°¡°Ô µË´Ï´Ù. ÀÌ·± ÀÌÀ¯·Î ½Ã½ºÅÛÀ» »ç¿ëÇÒ ¶§ ƯÈ÷, ½Ã½ºÅÛÀÇ °ü¸®ÀÎÀ¸·Î¼­´Â »ç¿ëÀÚ °ü¸®¶ó´Â Á¡Àº ¸Å¿ì Áß¿äÇÑ ¾÷¹«ÀÔ´Ï´Ù. ¸¸¾à¿¡ ÀÖÀ» ¼ö ÀÖ´Â ¾ÆÀ̵𠵵¿ëÀ̳ª, Å©·¢Å·¿¡ ´ëÇÑ ¹æÁö¿¡ ±âº»ÀÌ µÇ´Â Áß¿äÇÑ ÀÏÀÔ´Ï´Ù.

     

1. »ç¿ëÀÚ ¸¸µé±â

    »ç¿ëÀÚ¸¦ ¸¸µå´Â ¹æ¹ý¿¡ ¾²ÀÌ´Â adduser ¿Í  passwd ¸í·É¾îÀÇ »ç¿ë¹æ¹ý¿¡ ´ëÇؼ­ °£´ÜÈ÷ À̾߱âÇÏ°íÀÚ ÇÕ´Ï´Ù. ¿ì¼±Àº »ç¿ë ¹æ¹ý¿¡ ´ëÇؼ­ õõÈ÷ ¼³¸íÇϵµ·Ï ÇÏ°Ú½À´Ï´Ù.

    1.1  »ç¿ëÀÚ¸¦ ¸¸µå´Â ¹æ¹ýÀº ¾ÆÁÖ °£´ÜÇÕ´Ï´Ù. ¾Æ·¡¿Í °°ÀÌ adduser¸¦ »ç¿ëÇÕ´Ï´Ù.
     

    [root@enveng /root]#adduser wonshin[wonshinÀº »ç¿ëÀÚ¸í]

     
    Looking for first available UID... 523 <- À¯Àú¾ÆÀ̵ð ¹øÈ£°¡ »ý±é´Ï´Ù.
    Looking for first available GID... 523 <- ±×·ì¾ÆÀ̵ð ¹øÈ£°¡ »ý±é´Ï´Ù.
    Adding login : I...done <- login ÀÌ »ý¼ºµË´Ï´Ù.
    Creating home directory : /home/wonshin...done.
                                         <- wonshin »ç¿ëÀÚÀÇ µð·ºÅ丮°¡ /home/wonshin¿¡ »ý±é´Ï´Ù.
    Creating mailbox : /var/spool/mail/wonshin... done
                               <- ¸ÞÀÏ ½ºÇ®ÀÌ »ý¼ºµË´Ï´Ù.[ÀÌ°ÍÀÌ ÀÖ¾î¾ß ¸ÞÀÏÀ» ¹Þ¾Æ¿ä]
    Don't forget to set the password <- Ä£ÀýÇÏ°Ôµµ passwd wonshin À̶ó°í Ãļ­ Æнº¿öµå¸¦
                                                        ÀÔ·ÂÇ϶ó°í ³ª¿À´Â±º¿ä.

     

    1.2  ÀÌÁ¦´Â »ç¿ëÀÚÀÇ Æнº¿öµå¸¦ ÁöÁ¤ÇØ¾ß ÇÕ´Ï´Ù. ¸í·É¾î´Â passwd¸¦ »ç¿ëÇÏ½Ã¸é µË´Ï´Ù.
     

    [root@enveng /root]# passwd wonshin
    New UNIX passward :

     
    BAD PASSWORD : it is too short <- º¸¾È»ó ª°Ô Æнº¿öµå¸¦ ÀÔ·ÂÇß´Ù°í °æ°í°¡ ³ª¿À´Â±º¿ä
                                                       [Âü°í : ÀÌ·± °æ¿ì¿¡´Â ´Ù½Ã ÀÔ·ÂÀ» ÇÏ¼Å¾ß ÇÕ´Ï´Ù.]
     

    Retype new UNIX password :


    passwd : all authentication tokens updated successfully
                  ->¼º°øÀûÀ¸·Î Æнº¿öµå ÀÔ·ÂÀÌ µÇ¾ú´Ù°í ³ª¿À³×¿ä.

     

    1.3  Áߺ¹»ç¿ëÀÚ°¡ ÀÖÀ» ¶§ÀÇ ¿¡·¯ ¸Þ¼¼Áö
     

    [root@enveng /root]adduser wonshin

     
    User wonshin already exists <- ÀÌ¹Ì wonshin À̶ó´Â »ç¿ëÀÚ°¡ ÀÖ´Ù°í ³ª¿ÀÁö¿ä. ÀÌ·¯ÇÑ Áߺ¹ »ç¿ëÀÚ°¡ ¾ø°ÚÁö¿ä?

     

2. /etc/passwd ¶õ?

    ¾ÕÀÇ ³»¿ëó·³ adduser ¿Í passwd¸¦ »ç¿ëÇÏ½Ã¸é ±× Á¤º¸ÀÇ ³»¿ëµéÀÌ /etc/passwd ÆÄÀÏ¿¡ ÀúÀåÀÌ µÇ°Ô µË´Ï´Ù. ¸¸µå½Å ¾ÆÀ̵ð·Î loginÀ» ÇÒ ¶§ /etc/passwd ¿¡ ÀÖ´Â °èÁ¤ÀÇ °ËÁõÀ» °ÅÄ¡°Ô µË´Ï´Ù.

     

    2.1  /etc/passwd ÆÄÀÏ¿¡ ÀÚ¼¼È÷ ¾²¿©Áø Çü½ÄÀ» »ìÆ캸¸é
     

wonshin : wOp4kzPmabOJM : 523 : 523 : RHS Linux User : /home/wonshin : /bin/bash
»ç¿ëÀÚ¸í : Æнº¿öµå : À¯Àú¾ÆÀ̵ð : ±×·ì¾ÆÀ̵ð : »ç¿ëÀÚ Á¤º¸ :    µð·ºÅ丮¸í    : »ç¿ëÇÏ´Â ½©


      2.1.1  »ç¿ëÀÚ ¸í

      ÀϹÝÀûÀ¸·Î ID ¶ó°í ºÎ¸£´Â °ÍÀ¸·Î »ç¿ëÀÚÀÇ À̸§ÀÌ µË´Ï´Ù.

      login : ÇÁ·ÒÇÁÆ®¿¡¼­ ŸÀÌÇÎÇÏ´Â °ÍÀ» ¸»ÇÕ´Ï´Ù. ±×¸®°í »ç¿ëÀÚ °¢°¢ÀÇ À̸§À¸·Î½á
                Áߺ¹µÈ »ç¿ëÀÚ°¡ ³ª¿À¸é ¾Ë¾Æ¼­ ¿¡·¯ ¸Þ½ÃÁö¸¦ º¸³»ÁֹǷΠ¿¾³¯ À¯´Ð½º°°ÀÌ
                °í¹ÎÀ» ÇÒ ÇÊ¿ä´Â ¾ø½À´Ï´Ù.

      2.1.2  Æнº¿öµå

      6ÀÚ ÀÌ»óÀÇ Æнº¿öµå¸¦ Àû¾î¾ß ÇÑ´Ù. ±×·¸Áö ¾ÊÀ¸¸é Æнº¿öµå °Ë»çÇÁ·Î±×·¥¿¡ ÀÇÇؼ­ °ÅÀýÀ» ´çÇÏ°Ô µË´Ï´Ù. wOp4kzPmabOJM Àº »ç¿ëÀÚ°¡ Á¤ÇÑ Æнº¿öµå¸¦ ¾ÏȣȭÇÏ¿©¼­ ³ªÅ¸³­ ¹®ÀÚÀÔ´Ï´Ù. ¾ÕÀÇ µÎ ÀÚ¸®´Â 2ÀÚ¸®´Â 2500°³ÀÇ Á¶ÇÕ Áß¿¡¼­ ¹«ÀÛÀ§·Î Á¶ÇÕÀ» Á¤Çؼ­ ÀÛ¼ºÇÏ°Ô µÇ°í ±× ³ª¸ÓÁö µÚ¿¡ ÀÖ´Â °ÍÀº »ç¿ëÀÚ°¡ ÀÔ·ÂÇÑ ¾ÏÈ£¸¦ ¾ÏȣȭÇÑ °ÍÀÌÁö¿ä. ÇÏÁö¸¸ ÀÌ·¸°Ô ÇÏ¿©µµ ¾ÏÈ£¸¦ Å©·¢Å· ´çÇÏ´Â °æ¿ì°¡ ÀÖ½À´Ï´Ù. wOp4kzPmabOJMÀ» °Å²Ù·Î µ¹·Á¼­ ¾ÏÈ£¸¦ ¾Ë¾Æ³»´Â °ÍÀÌÁö¿ä. ¸¸¾à »ç¿ëÀÚ°¡ ÀÏÁ¤ÇÑ ´Ü¾î³ª ¼ýÀÚ·Î ¾ÏÈ£¸¦ ¸¸µé¸é.. ¾ÆÁÖ ½±°Ô ¾ÏÈ£¸¦ ¾Ë¾Æ³¾ ¼ö °¡ ÀÖÁö¿ä. ±×·¡¼­ shadow ½Ã½ºÅÛÀ» »ç¿ëÇÏ¿©¼­ ¾Æ·¡¿Í °°ÀÌ
       

      => /etc/passwd
      wonshin : *: 523 : 523 : RHS
      Linux User : /home/wonshin : /bin/bash

       

      /etc/passwd ÆÄÀÏ¿¡´Â Æнº¿öµå ÀÚ¸®¿¡ *¸¦ »ç¿ëÇÏ°í ´ë½Å¿¡ /etc/shadow ¿¡ wOp4kzPmabOJMÀ» ³Ö¾îµÎ´Â ¹æ½ÄÀ» »ç¿ëÇϱ⵵ ÇÕ´Ï´Ù.

      Âü°í : login °úÁ¤À» ÀÌÇØÇÒ ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù.
      1. ¸ÕÀú getty °¡ ½ÇÇàÀÌ µÇ¾î¼­ login : À̶ó°í ³ª¿Â´Ù.
      2. »ç¿ëÀÚ¸í°ú Æнº¿öµå¸¦ ÀÔ·ÂÇÏ¸é ±×°ÍÀ» ¹Þ¾Æ¼­ /etc/passwd ÆÄÀÏ°ú ´ëÁ¶ÇÑ´Ù.
      3. ¸ÂÀ¸¸é shallÀ» ½ÇÇàÇÑ´Ù.

      ¢º Tip
      => Æнº¿öµå ¾øÀÌ ·Î±ä½ÃÅ°·Á¸é ¾Æ·¡¿Í °°ÀÌ ÇÏ¸é µË´Ï´Ù.
       

      wonshin::523:523:RHS Linux User:/home/wonshin:/bin/bash


      => ƯÁ¤ÇÑ »ç¿ëÀÚÀÇ »ç¿ëÀ» Àá½Ã ¸·À¸·Á¸é ¾Æ·¡¿Í °°ÀÌ Æнº¿öµå ÀÚ¸®¿¡ '*' ¹®ÀÚ¸¦
           Çϳª Ãß°¡Çϼ¼¿ä.
       

      wonshin:wOp4kzPmabOJM*:523:523:RHS Linux User:/home/wonshin :/bin/bash


      ³ªÁß¿¡ Çã¿ëÇÏ·Á¸é *À» »© ¹ö¸®½Ã¸é µË´Ï´Ù.

      2.1.3  À¯Àú ¾ÆÀ̵ð[UID]

      »ç¿ëÀÚ °³°³Àθ¶´Ù ºÙ´Â °íÀ¯ÀÇ ¾ÆÀ̵ðÀÔ´Ï´Ù.
      ÀÌ°ÍÀ» ÀÌ¿ëÇÏ¸é »ç¿ëÀÚ ¼³Á¤¿¡¼­ ¾ÆÀ̵𸦠»ç¿ëÇÏ´Â ¹ø°Å·Î¿òÀ» ´ú ¼ö ÀÖ½À´Ï´Ù.

      2.1.4  ±×·ì ¾ÆÀ̵ð[GID]

      À¯Àú ¾ÆÀ̵ð¿Í °°Àº °³³äÀÇ ¹æ½ÄÀÔ´Ï´Ù.

      2.1.5  »ç¿ëÀÚ Á¤º¸
       

      [root@enveng /etc]# chfn wonshin
      Changing finger information for wonshin.
      Name [] : ½Å¿µÁø


      Control characters are not allowed.
      <- Çã¿ëÇÒ ¼ö°¡ ¾ø´Ù´Â±º¿ä. ¿µ¾î·Î ¾²¸é ±¦Âú½À´Ï´Ù.  
       

      Name [] : <- ½ÇÁ¦À̸§
      Office [] : <- »ç¹«½Ç
      Office Phone [] : <- »ç¹«½Ç ÀüÈ­¹øÈ£
      Home Phone [] : <- ÀüÈ­¹øÈ£

      Finger information changed.


      [root@enveng wonshin]# vi passwd
         <- Áï ÇѱÛÀ» »ç¿ëÇÏ½Ã°í ½ÍÀ¸¸é ÇѱÛȯ°æ¿¡¼­ ¿¡µðÅÍÇϼ¼¿ä. ÇÑÅÒ°°Àº °ÍÀ»
              ¸»ÇÕ´Ï´Ù.
      wonshin:wOp4kzPmabOJM:523:523:RHS Linux User:/home/wonshin :/bin/bash
         <- ¿©±â¼­ Ä¿¼­¸¦ RHS Linux User ¿¡ R ¿¡ ¸ØÃß°í ³ª¼­ x ¹öÆ°À» ´©¸£¸é Çϳª¾¿
              Áö¿öÁý´Ï´Ù.
      wonshin:wOp4kzPmabOJM:523:523::/home/wonshin :/bin/bash 
         <- ±×·³ ¿©±â¼­ RHS Linux User ±îÁö Áö¿ì½Ã°í ³ª¼­ ´Ù½Ã i ¹öÆ°À» ´©¸£¸é ¸Ç ³¡¿¡
              -insert- ¶ó´Â ¸Þ½ÃÁö¿Í ÇÔ²² ÀÔ·ÂÀÌ µË´Ï´Ù.
      wonshin:wOp4kzPmabOJM :523:523:½Å¿µÁø:/home/wonshin :/bin/bash 
         <- ¿øÇϽô ÇѱÛÀ» ¾²¼¼¿ä.
      wonshin:wOp4kzPmabOJM:523:523:½Å¿µÁø,»ç¹«½Ç,»ç¹«½ÇÀüÈ­¹øÈ£,ÁýÀüÈ­¹øÈ£:/home/wonshin :/bin/bash
         <- ½°Ç¥ÇϽðí À§¿¡ º¸´Â ¹Ù¿Í °°ÀÌ ÀÔ·ÂÇÏ½Ã¸é µË´Ï´Ù.
         <- ±×¸®°í ³ª¼­ Shift+: ¸¦ ´©¸£½Ã¸é ¾Æ·¡¿¡ : ¶ó°í ³ª¿É´Ï´Ù. ¿©±â¿¡ wq¸¦ ÇϽðí
              ³ª¿À¼¼¿ä.

      Âü°í·Î Á¦°¡ root °¡ ¾Æ´Ï´õ¶óµµ ÀÚ±â ÀÚ½ÅÀÇ ÇÁ·ÎÇÊ Á¤µµ´Â °íÄ¥ ¼ö ÀÖ½À´Ï´Ù.
       

      [wonshin@enveng]#chfn
      Changing finger information for wonshin.
      Password : <- Æнº¿öµå¸¦ ÀÔ·ÂÇϼ¼¿ä.
      Name [] : ½Å¿µÁø
      Control characters are not allowed.
                     <- Çã¿ëÇÒ ¼ö°¡ ¾ø´Ù´Â±º¿ä. ¿µ¾î·Î ¾²¸é ±¦Âú½À´Ï´Ù.
      Name [] : <- ½ÇÁ¦À̸§
      Office [] : <- »ç¹«½Ç
      Office Phone [] : <- »ç¹«½Ç ÀüÈ­¹øÈ£
      Home Phone [] : <- ÀüÈ­¹øÈ£

      Finger information changed.
      [wonshin@enveng]# 

       

      2.1.6  µð·ºÅ丮

      ÀÌ°ÍÀº »ç¿ëÀÚ°¡ Á¢¼ÓÀ» ÇÏ°í ³ª¼­ ¹Ù·Î º¸ÀÌ´Â ÀڽŸ¸ÀÇ µð·ºÅ丮¸¦ ÁöÁ¤ÇØ ÁÖ´Â °ÍÀÔ´Ï´Ù. ¿øÇÑ´Ù¸é »ç¿ëÀÚÀÇ µð·ºÅ丮¸¦ ´Ù½Ã ÁöÁ¤ÇØ ÁÙ ¼öµµ ÀÖ½À´Ï´Ù. º¸Åë RedHat ¿¡¼­´Â /home À¸·Î µÇ¾î ÀÖ½À´Ï´Ù. ¸ÕÀú vi ¿¡µðÅ͸¦ ÀÌ¿ëÇؼ­ ÆíÁýÀ» Çϼ¼¿ä.

      [root@enveng /etc]# vi passwd
         <- ¸¸¾à /home/wonshinÀ» /usr1/wonshinÀ¸·Î ¹Ù²Ù¾î ÁÖ¾ú´Ù°í Çϸé
      wonshin:wOp4kzPmabOJM:523:523:½Å¿µÁø,½ÇÇè½Ç,211-2345,234-344 :/home/wonshin :/bin/bash
         <- ¿©±â¼­ Ä¿¼­¸¦ /home/wonshin ¿¡ ¸ØÃß°í ³ª¼­ x ¹öÆ°À» ´©¸£¸é Çϳª¾¿
              Áö¿öÁý´Ï´Ù.
      wonshin:wOp4kzPmabOJM:523:523:½Å¿µÁø,½ÇÇè½Ç,211-2345,234-344::/bin/bash
         <- ±×·³ ¿©±â±îÁö Áö¿ì½Ã°í ³ª¼­ ´Ù½Ã i ¹öÆ°À» ´©¸£¸é ¸Ç ³¡¿¡ -insert- ¶ó´Â
              ¸Þ½ÃÁö¿Í ÇÔ²² ÀÔ·ÂÀÌ µË´Ï´Ù.
      wonshin:wOp4kzPmabOJM:523:523:½Å¿µÁø,½ÇÇè½Ç,211-2345,234-344 :/usr1/wonshin :/bin/bash
         <- ±×¸®°í ³ª¼­ Shift+: ¸¦ ´©¸£½Ã¸é ¾Æ·¡¿¡ : ¶ó°í ³ª¿É´Ï´Ù. ¿©±â¿¡ wq¸¦ ÇϽðí
              ³ª¿À¼¼¿ä.
       

      [root@envneg /etc]#mkdir /usr1/wonshin
      [root@envneg /etc]#chmod 701 /usr1/wonshin 
      [root@envneg /etc]#chown wonshin /usr1/wonshin
      [root@envneg /etc]#chgrp wonshin /usr1/wonshin 

       

      2.1.7  ½©

      ÀÌ ¸í·É¾î ÀÚ¸®¿¡ ½©À» Á¤ÇØÁÖ´Â °Í ¸»°íµµ ´Ù¸¥ ¸í·É¾î¸¦ ¾ó¸¶µçÁö Á¤ÇØ ÁÖ½Ç ¼ö°¡ ÀÖ½À´Ï´Ù. º¸Åë ÀÌ ¸í·É¾î¸¦ ½©¸¸ ÁöÁ¤ÇÏ´Â °ÍÀ¸·Î ¾Ë°í ÀÖ´Â »ç¿ëÀÚ°¡ ¸¹Áö¸¸ ¸¶Ä¡ À©µµ¿ì 95¿¡¼­ º¸µíÀÌ ÇÁ·Î±×·¥À» ½ÃÀÛÇÒ ¶§ ½ÃÀÛ ÇÁ·Î±×·¥¿¡ µî·ÏÇϸé ÇÁ·Î±×·¥ÀÌ ½ÃÀÛÇÏÀÚ¸¶ÀÚ ¶ß´Â °Í°ú °°Àº È¿°ú¸¦ ÇÕ´Ï´Ù. ¿©±â¿¡´Ù°¡ ½© ¸í·É¾î ¸»°íµµ ´Ù¸¥ ¸í·É¾î¸¦ »ç¿ëÇϼż­ login °¡ µ¿½Ã¿¡ ÀÛµ¿ÇÏ°Ô ÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù. »ç½Ç ¸»ÀÌ¾ß ¹Ù¸¥ ¸»ÀÌÁö window Á¦Ç°À» º¸¸é À¯´Ð½º¸¦ ´àÀº °ÍÀÌ Âü ¸¹Áö¿ä.

      ÇÏÁö¸¸ º¸Åë ½©À» ¾²´Ï±î ¼³¸íÇÏÀÚ¸é ½©Àº À§¿¡¼­ °°ÀÌ /bin/bash¸¦ »ç¿ëÇϼŵµ ¹«¹æÇÕ´Ï´Ù.

      ÇÁ·Î±×·¡¹ÖÀ» ÇÒ ¶§³ª C ¾ð¾î¿¡ ±âÃÊ°¡ ÀÖÀ¸¸é /bin/csh ·Î ¹Ù²Ù´Â °Íµµ ÁÁÁö¿ä.
       

      [root@envneg /etc]#chsh wonshin
      Changing shell for wonshin 
      New shell [/bin/csh] : /bin/csh
      Shell changed.

       
      ¹°·Ð Àڽŵµ ¹Ù²Ü ¼ö ÀÖÁö¿ä.

       

     2.2  ÀÌ·¸°Ô »ç¿ëÀÚ¿¡ ´ëÇÑ °ü¸®´Â /etc/passwd ÆÄÀÏ¿¡ ÀúÀåÀÌ µË´Ï´Ù.

      2.2.1  /etc/passwd¸¦ Çѹø »ìÆ캸¸é ¾Æ·¡¿Í °°½À´Ï´Ù.
       

    [root@envneg /etc]#cat /etc/passwd
    root:yikdldldbUDfMI:0:0:root:/root:/bin/bash
    admin:L0J2d;d;qA:0:0:root:/home/admin:/bin/bash
    bin:*:1:1:bin:/bin:
    daemon:*:2:2:daemon:/sbin:
    adm:*:3:4:adm:/var/adm:
    Ip:*:4:7:Ip:/var/spool/Ipd:
    sync:*:5:0:sync:/sbin:/bin/sync
    shutdown:*:6:0:shutdown:/sbin:/sbin/shutdown
    halt:*:7:0:halt:/sbin:/sbin/halt
    mail:*:8:12:mail:/var/spool/mail:
    news:*:9:13:news:/var/spool/news:
    uucp:*:10:14:uucp:/var/spool/uucp:
    operator:*:11:0:operator:/root:
    games:*:12:100:games:/usr/games:
    gopher:*:13:30:gopher:/usr/lib/gopher-data:
    ftp:*:14:50:FTP User:/home/ftp:
    nobody:*:99:99:Nobody:/:
    beginend:leddfdTlw4l:500:500:Seoung-cho An:/home/beginend:/bin/bash
    sun:/0Hxj2dddOfLo:501:501:ÃÖ°í´Ù:/home/sun:/binbash
    smusso33:pGN48585ylc6:504:504:¹Ú½Â±¹:/home/smusso33:/bin/bash
    soil:bH7D3g0493Y/I:505:505:Á¤¿µµµ:/home/soil:/bin/bash
    js9545:7H15868U.T1lM:506:506:ÀÌÁ¤½Ä:/home/js9545l:/bin/bash
    bsmin:GLn48568aJE:507:507:¹Îº´¼ö:/home/bsmin:/bin/bash
    king:jjZxtQO2paXCs:508:508:ÀÌÁ¤¹Î:/home/king:/bin/bash
    romeo:VFBJW9BCwVqrE:509:509:½Å¼³¿ì:/home/romeol:/bin/bash
    mskim:uIJ7oo8ByAJsM:510:510:±è¸¸¼ö:/home/mskim:/bin/bash
    zeroscan:uzmqbTtRQKgKg:511:511:±èÀμº:/home/zeroscan:/bin/bash
    paladin:BUFnA7bzS46f2:512:512:Zippo Brand:/home/paladin:/bin/bash
    jhlee:zMRQn0CMy32:513:513:ÀÌÁ¤ÈÆ:/home/jhlee:/bin/bash
    jayou:8rEc99D97NQ:514:514:ÃÖ¹ü½Ä:/home/jayou:/bin/bash
    profile:LKw6Gq733FM:515:515:ÀÌ»ó¿ì:/home/profile:/bin/bash
    jykim:4jVkB13ARCXE:516:516:±èÀç¿ë:/home/jykim:/bin/bash
    mummy:XDVIUZQIna6:517:517:Çѹ̶ó:/home/mummy:/bin/bash
    event:0EWmxowWMOY:518:518:È«ÀºÈñ:/home/event:/bin/bash
    dragon:Eh4Z4mxoRA:519:519:±èÅ¿­:/home/dragon:/bin/bash
    liebe629:hthdddX5Oc1r2:520:520:·ùÀα¸:/home/liebe629:/bin/bash
    pschoi:Po6X06C8HaeHw:521:521:ÃÖ¹ü½Ä:/home/pschoi:/bin/bash
    beb:MaPLT5lhd.UWQ:522:522:º¯ÀǺ¹:/home/beb:/bin/bash
    wonshin:wOp4kzPmabOJM:523:523:RHS Linux User:/home/wonshin:/bin/bash 

       

3. °ü¸®Çϱâ

    3.1  login ¾øÀÌ »ç¿ëÀÚ ¹Ù²Ù±â

    su ¸í·É¾î¸¦ »ç¿ëÇÏ¿©¼­ º¸Åë ÀÌ·± ÀϵéÀ» ó¸®ÇÏ°Ô µË´Ï´Ù. ÀϹÝÀûÀ¸·Î ¸®´ª½º »ç¿ëÀÚµéÀÇ ÀϹÝÀûÀÎ ¹®Á¦µéÀ» º¸¸é... Ç×»ó ¸ðµç ÀÏÀ» root ·Î ó¸®ÇÑ´Ù´Â °ÍÀÔ´Ï´Ù. root ¶ó´Â °èÁ¤Àº ¸ðµç ÀÏÀ» ÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù. ½Ã½ºÅÛÀ» Çâ»óµÇ°í ¿Ã¹Ù¸£°Ô ÇÒ ¼öµµ ÀÖÁö¸¸ ½Ã½ºÅÛÀ» ¿ÏÀüÈ÷ °íö·Î ¸¸µå´Â ¿ªÇÒµµ ÇÒ ¼ö ÀÖ½À´Ï´Ù. ±×·¸±â ¶§¹®¿¡ ¾Æ¹«¸® °ü¸®ÀÚ¶óµµ º°µµÀÇ °³ÀÎ ¾ÆÀ̵𸦠»ç¿ëÇÏ°í ½Ã½ºÅÛ¿¡ ƯÁ¤ÇÑ ÀÏÀ» ÇÒ ¶§¸¸ su ¸í·É¾î¸¦ »ç¿ëÇÏ¿©¼­ ó¸®ÇØ¾ß ÇÕ´Ï´Ù.

    [wonshin@enveng /wonshin]#su <= root ·Î °èÁ¤À» ¹Ù²Ù¾î º¸°Ú½À´Ï´Ù.
    passwd : <= root ÀÇ ¾ÏÈ£¸¦ ÀÔ·ÂÇϼ¼¿ä.
    [root@enveng /wonshin# <= ÀÌÁ¦ ·çÆ®°¡ µÈ °ÍÀÔ´Ï´Ù.
    [root@enveng /wonshin]# exit <= ÀÌ·¸°Ô ÇÏ¸é ´Ù½Ã wonshin ÀÌ µË´Ï´Ù.

    root °¡ ¾Æ´Ñ ´Ù¸¥ »ç¿ëÀÚ·Î ¹Ù²Ù·Á¸é su ´ÙÀ½¿¡ ÀÌ¿ëÇÏ°íÀÚ ÇÏ´Â »ç¿ëÀÚ ¾ÆÀ̵𸦠ÀÔ·ÂÇÏ¸é µË´Ï´Ù. root¿¡¼­ ¹Ù²Ù¸é passwd¸¦ ¹°¾îº¸Áö ¾Ê½À´Ï´Ù. haremoon ·Î °èÁ¤À» ¹Ù²Ù¾î º¸°Ú½À´Ï´Ù.
     

    [wonshin@enveng/wonshin]#su haremoon
    passwd
    [haremoon@enveng /wonshin]#whoami
    haremoon

     
    -c ¿É¼ÇÀ» ÀÌ¿ëÇϸé login ÇÒ ÇÊ¿ä¾øÀÌ ÇÏ°íÀÚ ÇÏ´Â ÀÏÀ» ó¸®ÇÒ ¼ö ÀÖ½À´Ï´Ù.
     

    [wonshin@enveng/wonshin]#su root -c "rm -f /root/howto.txt"

     

    3.2  sudo

    sudo¶ó´Â ¸í·É¾î¸¦ »ç¿ëÇϼŵµ ¹«¹æÇÕ´Ï´Ù. ÀÌ ¸í·É¾î¸¦ »ç¿ëÇÏ½Ã¸é º¸´Ù °£´ÜÇÏ°Ô ¿©·¯ °¡Áö¸¦ »ç¿ëÇÒ ¼ö°¡ ÀÖ´Ù°í ÇÕ´Ï´Ù. Àú´Â º°·Î »ç¿ëÇÏÁö ¾ÊÁö¸¸ ¸ÕÀú ¼³Á¤ÀÌ ÇÊ¿äÇÕ´Ï´Ù.

    [root@enveng /root]#vi /etc/sudoers <= root ¿©¾ß ÇÕ´Ï´Ù.
    wonshin ALL=/sbin/shutdoun, /sbin/adduser <= Ç×»ó Æнº¸íÀ» ´Ù ºÙÀÌ´Â °ÍÀ» ÀØÁö ¸¶¼¼¿ä.
     

    [wonshin@enveng/wonshin]#sudo shutdoun

     

4. ±×·ì

    ±×·ìÀ» ¸¸µå´Â ÀÌÀ¯´Â ¿©·¯ °¡ÁöÀÔ´Ï´Ù. ¸ÞÀÏÀ» º¸³¾ ¶§, »ç¿ëÀÚµéÀ» ºÐ¸®ÇÒ ¶§, º¸¾Èµî±ÞÀ» Á¤ÇÒ ¶§ µîµî ±×·ìÀ¸·Î ÀÎÇؼ­ ¿©·¯ °¡Áö ÀϵéÀ» Çѹø¿¡ ó¸®ÇÒ ¼öµµ ÀÖ°í, °ü¸®¿¡ ÆíÇÔÀ» Ãß±¸ÇÒ ¼ö ÀÖ´Â ÀÕÁ¡ÀÌ ÀÖ½À´Ï´Ù. Áï, 89Çйø, 90Çйø, 91Çйø ¼øÀ¸·Î ±×·ìÀ» ¸¸µé¾î »ç¿ëÀÚµéÀ¸·Î ±×·ì¿¡ ¼ÓÇÏ°Ô ¸¸µé¾î¼­ ¿©·¯ ¹ø ÇÒ ÀϵéÀ» Çѹø¿¡ È¿À²ÀûÀ¸·Î ó¸®ÇÒ ¼ö ÀÖ½À´Ï´Ù.

     

    4.1  ±×·ì Çü½Ä

    ±×·ìÀÇ Çü½ÄÀº ¾Æ·¡¿Í °°½À´Ï´Ù.
     

    group : password : GID : user_list


    ±×·ì¸í : Æнº¿öµå : ±×·ì¾ÆÀ̵ð : ±×·ì¿¡ ¼ÓÇÑ »ç¿ëÀÚ¸í

    ¸¸¾à Æнº¿öµå¸¦ Á¤ÇÏ¿´´Ù¸é newgrp À̶ó´Â ¸í·É¾î¸¦ »ç¿ëÇÏ¿© ±× ±×·ìÀÇ ±ÇÇÑÀ» ¾òÀ» ¼ö ÀÖ½À´Ï´Ù.
     

    [root@enveng /root]cat /etc/group
    root :: 0 : root
    bin :: 1 : root,bin,daemon
    daemon :: 2 : root,bin,daemon
    sys :: 3 : root,bin,adm
    adm :: 4 : root,adm,daemon
    tty :: 5 :
    disk :: 6 : root
         < »ý·« >
    dip :: 40 :
    ftp :: 50 :
    nobody :: 99 :
    users :: 100 : beginend,admin,sun,wonshin,haremoon,smusso33,soil, js9545,bsmin,king,romeo,mskim,zeroscan,paladin,jhlee,jayou,profile,jykim, mummy,event,dragon,delpast,liebe629,pschoi,beb,ssnam,won

     

    Tip

    ±×¸®°í ¶ÇÇÑ root ÀÇ ±×·ì ¾ÆÀ̵𰡠0 ÀÌÁö¿ä? ¸¸¾à¿¡ ½Ã½ºÅÛ °ü¸®ÀÚ°¡ ¿©·¯ ¸íÀ̰ųª ¿ÜºÎ¿¡¼­ ·Î±äÇÒ ¼ö ÀÖ´Â °ü¸®µî±ÞÀ» ÁÖ°í ½ÍÀ¸½Ã¸é GID¸¦ root ¿Í °°ÀÌ ÁÖ¸é »ç¿ëÀÚÀÇ Æнº¿öµå³ª º¸¾È¼öÁØÀÌ ºñ½ÁÇØÁöÁö¿ä.
     

    [root@enveng /root]cat /etc/passwd
    root:y/iK0GbbUMI:0:0:/root:/root:/bin/bash
    admin:L0J2N3rXihA:0:0:root:/home/admin:/bin/bash




¡ã top

homeÀ¸·Î...