´ÙÀ½ ÀÌÀü Â÷·Ê

3. NIS master ¼­¹ö¸¦ ¾î¶»°Ô ¼³Á¤Çϴ°¡

  1. nis ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù. RPC daemonµé(rpc.portmap)À» ¼³Ä¡Çϱâ À§ÇØ netbase¿Í netstdµµ ¼³Ä¡ÇØ¾ß ÇÕ´Ï´Ù.
  2. master, slave ±¸ºÐ¾øÀÌ NIS ¼­¹ö·Î »ç¿ëµÉ ¸ðµç ½Ã½ºÅÛÀÇ À̸§ÀÌ /etc/hosts ÆÄÀϳ»¿¡ ÀÖ¾î¾ß ÇÕ´Ï´Ù. °¢ IP ÁÖ¼Ò µÚ¿¡ ù ¹ø° hostnameÀÌ FQDN(Fully Qualified Domain Name)À̾î¾ß ÇÏ°í, ±×¿¡ À̾î domainnameÀ» Á¦¿ÜÇÑ hostname¸¸À» ±âÀÔÇÕ´Ï´Ù. ¿¹¸¦ µé¸é:
    192.168.88.10   troi.cistron.nl troi
    

    NIS´Â DNS¸¦ »ç¿ëÇÏÁö ¾Ê±â ¶§¹®¿¡ NIS server ³»ÀÇ NIS host file(º¸Åë /etc/hosts)µµ ÀÌ ¼³Á¤À» ÇØ¾ß ÇÕ´Ï´Ù.

  3. /etc/defaultdomain¿¡ NIS domainÀ» ¼³Á¤ÇÕ´Ï´Ù. NIS domainÀº NIS¸¦ »ç¿ëÇÏ´Â ½Ã½ºÅÛµéÀÇ ±×·ìÀ» ³ªÅ¸³»´Â À̸§À¸·Î hostname°ú´Â ´Ù¸¨´Ï´Ù. ÀÌ°ÍÀº º¸Åë DNS domainnameÀ» ÀÌ°Í¿¡µµ »ç¿ëÇÕ´Ï´Ù.

    ÀÌ°ÍÀº ¸¹Àº »ç¶÷µé¿¡ ÀÇÇØ º¸¾È À§ÇèÀ» ÁöÀûµÇ°í ÀÖ½À´Ï´Ù. domainnameÀ» ¾Æ´Â °Í¸¸À¸·Î ¿ø°ÝÁö¿¡¼­ NIS server¿¡ query¸¦ º¸³»°í NIS ¸ÊµéÀ» ¹ÞÀ» °¡´É¼ºÀÌ Àֱ⠶§¹®ÀÔ´Ï´Ù. ÀÌ°ÍÀ» ¸·±âÀ§ÇØ ¸ðÈ£ÇÑ domainnameÀ» ¼±ÅÃÇؼ­´Â ¾ÈµË´Ï´Ù. ´ÜÁö Áö¿ª ³×Æ®¿öÅ© ÀÌ¿Ü¿¡¼­ NIS ¼­¹ö¿¡ Á¢±ÙÇÒ ¼ö ¾øµµ·Ï ÇÏ¸é µË´Ï´Ù.

  4. /etc/init.d/nis ÆÄÀÏ ³»ÀÇ ypserv¸¦ master·Î (ypserv=master) ¼³Á¤ÇÕ´Ï´Ù.
  5. À§¿¡¼­ ¸»ÇÑ °Í°ú °°ÀÌ, Áö¿ª ³×Æ®¿öÅ© ¹øÈ£¸¦ /etc/ypserv.securenets¿¡ Ãß°¡ÇÕ´Ï´Ù. ±âº»°ªÀ¸·Î ¸ðµç ½Ã½ºÅÛÀÌ NIS server¿¡ Á¢±ÙÇÒ ¼ö ÀÖµµ·Ï µÇ¾î ÀÖÁö¸¸ ÀÌ·¸°Ô ÇÏÁö ¾Ê´Â °ÍÀ» ±ÇÀåÇÕ´Ï´Ù.

    º¸¾ÈÀÇ °­È­¸¦ À§ÇØ /etc/ypserv.conf ÆÄÀÏÀ» ¼öÁ¤ÇÏ¿© password¸¦ ³ª¿ÀÁö ¾Êµµ·Ï(mangle)ÇÒ ¼ö ÀÖ½À´Ï´Ù. (³×Æ®¿öÅ© ³»¿¡ µ¥ºñ¾ÈÀÌ ¾Æ´Ñ slave serverµéÀÌ ÀÖÀ» ¶§¿¡´Â ÀÌ°ÍÀ» »ç¿ëÇؼ­´Â ¾ÈµË´Ï´Ù.)

  6. "/usr/lib/yp/ypinit -m"À» ÀÔ·ÂÇÏ¿© ¼­¹ö¸¦ ¼³Á¤ÇÕ´Ï´Ù.
  7. ´ÙÀ½À» ÀÔ·ÂÇÏ¿© ¼­¹ö¸¦ ½ÃÀÛÇÕ´Ï´Ù.
    /etc/init.d/nis stop
    /etc/init.d/nis start
    

    ¼­¹ö(ypserv)¿Í Æнº¿öµå µ¥¸ó(yppasswdd)ÀÌ ½ÃÀ۵˴ϴÙ.

    NIS ¼­¹ö¿¡ÀÇ Á¢±ÙÀ» Á¦ÇÑÇϱ⸦ ¿øÇϸé NIS ¼­¹ö¸¦ Ŭ¶óÀ̾ðÆ®¿Í ¸¶Âù°¡Áö·Î ypbind¸¦ ½ÇÇàÇÏ°í /etc/passwd ÆÄÀÏÀÇ Áß°£¿¡ plus-entries¸¦ Ãß°¡ÇÏ¿© ¼³Á¤ÇÕ´Ï´Ù. ¶óÀ̺귯¸® ÇÔ¼ö´Â ù ¹ø° NIS entry ÈÄÀÇ ¸ðµç normal entries¸¦ ¹«½ÃÇÏ°í, ³ª¸ÓÁö¸¦ NIS¸¦ ÅëÇØ ¾ò°Ô µË´Ï´Ù. ÀÌ ¹æ¹ýÀº NIS¿¡ÀÇ Á¢±Ù ±ÔÄ¢À» °ü¸®ÇÏ´Â ¹æ¹ýÀÔ´Ï´Ù.

    ¿¹:

            root:x:0:0:root:/root:/bin/bash
            daemon:*:1:1:daemon:/usr/sbin:
            bin:*:2:2:bin:/bin:
            sys:*:3:3:sys:/dev:
            sync:*:4:100:sync:/bin:/bin/sync
            games:*:5:100:games:/usr/games:
            man:*:6:100:man:/var/catman:
            lp:*:7:7:lp:/var/spool/lpd:
            mail:*:8:8:mail:/var/spool/mail:
            news:*:9:9:news:/var/spool/news:
            uucp:*:10:50:uucp:/var/spool/uucp:
            nobody:*:65534:65534:noone at all,,,,:/dev/null:
            +miquels::::::
            +:*:::::/etc/NoShell
            [ All normal users AFTER this line! ]
            tester:*:299:10: Just a test account:/tmp:
            miquels:1234567890123:101:10:Miquel van Smooreburg:/home/miquels:/bin/zsh
    

    »ç¿ëÀÚ tester´Â Á¸ÀçÇÏÁö¸¸, ½©ÀÌ /etc/NoShell·Î ÁöÁ¤µÇ¾î ÀÖ°í, miguels´Â º¸Åë Á¢±ÙÀ» °®°Ô µË´Ï´Ù.

    ´Ù¸¥ ¹æ¹ýÀ¸·Î, /var/yp/MakefileÀ» ¼öÁ¤ÇÏ°í NIS°¡ ´Ù¸¥ Æнº¿öµå ÆÄÀÏÀ» »ç¿ëÇϵµ·Ï ¼³Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù. Å« ½Ã½ºÅÛ¿¡¼­´Â, NIS Æнº¿öµå¿Í ±×·ìÆÄÀÏÀ» ÀϹÝÀûÀ¸·Î /var/yp/ypfiles/¿¡ ÀúÀåÇÕ´Ï´Ù. ÀÌ°ÍÀ» »ç¿ëÇÒ °æ¿ì¿£ Æнº¿öµå ÆÄÀÏÀ» °ü¸®ÇÏ´Â "passwd", "chfn", "adduser"µîÀÇ ÀÏ¹Ý °ü¸® µµ±¸¸¦ ´õÀÌ»ó »ç¿ëÇÒ ¼ö ¾ø°Ô µÇ¾î Ưº°ÇÑ µµ±¸¸¦ Á÷Á¢ ¸¸µé¾î »ç¿ëÇØ¾ß ÇÕ´Ï´Ù.

    ±×·¯³ª yppasswd, ypchsh, ypchfnÀº yppasswdd¸¦ -D ¿É¼ÇÀ¸·Î NIS Æнº¿öµå¿Í ½¦µµ¿ìÀÇ À§Ä¡¸¦ ÁöÁ¤ÇÏ¸é »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ À¯Æ¿¸®Æ¼µé°ú yppasswdd µ¥¸óÀÇ µ¥ºñ¾È ¹öÀüÀº ºñÇ¥ÁØ È®ÀåÀ» °¡Áö°í ÀÖ½À´Ï´Ù. "Root"´Â root Æнº¿öµå¸¦ »ç¿ëÇÏ¿© ´Ù¸¥ »ç¶÷µéÀÇ Æнº¿öµå, finger Á¤º¸¿Í ½©À» º¯°æÇÒ ¼ö ÀÖ½À´Ï´Ù.

    NIS Æнº¿öµå ÆÄÀÏÀ» Á÷Á¢ ¼öÁ¤Çϰųª Ç¥ÁØ /etc/passwd ÆÄÀÏÀ» »ç¿ëÇÑ´Ù¸é, NIS ¼Ò½º ÆÄÀÏÀÌ ÀÌ ÁßÀÇ Çϳª¶óµµ º¯°æµÈ ÈÄ /var/yp µð·ºÅ丮¿¡¼­ make¸¦ ½ÇÇà½ÃÄÑ NIS ¸ÊÀ» °»½ÅÇØ¾ß ÇÏ´Â °ÍÀ» ±â¾ïÇϽʽÿÀ. ÀÌ°ÍÀº cronÀ¸·Î ¹ã¿¡ ¼öÇà½ÃÄÑ ÃÖ½ÅÀÇ NIS ¸ÊÀ» À¯ÁöÇϵµ·Ï ÇÏ´Â °ÍÀÌ Àû´çÇÕ´Ï´Ù.


´ÙÀ½ ÀÌÀü Â÷·Ê