192.168.88.10 troi.cistron.nl troi
NIS´Â DNS¸¦ »ç¿ëÇÏÁö ¾Ê±â ¶§¹®¿¡ NIS server ³»ÀÇ NIS host file(º¸Åë /etc/hosts)µµ ÀÌ ¼³Á¤À» ÇØ¾ß ÇÕ´Ï´Ù.
ÀÌ°ÍÀº ¸¹Àº »ç¶÷µé¿¡ ÀÇÇØ º¸¾È À§ÇèÀ» ÁöÀûµÇ°í ÀÖ½À´Ï´Ù. domainnameÀ» ¾Æ´Â °Í¸¸À¸·Î ¿ø°ÝÁö¿¡¼ NIS server¿¡ query¸¦ º¸³»°í NIS ¸ÊµéÀ» ¹ÞÀ» °¡´É¼ºÀÌ Àֱ⠶§¹®ÀÔ´Ï´Ù. ÀÌ°ÍÀ» ¸·±âÀ§ÇØ ¸ðÈ£ÇÑ domainnameÀ» ¼±ÅÃÇؼ´Â ¾ÈµË´Ï´Ù. ´ÜÁö Áö¿ª ³×Æ®¿öÅ© ÀÌ¿Ü¿¡¼ NIS ¼¹ö¿¡ Á¢±ÙÇÒ ¼ö ¾øµµ·Ï ÇÏ¸é µË´Ï´Ù.
º¸¾ÈÀÇ °È¸¦ À§ÇØ /etc/ypserv.conf ÆÄÀÏÀ» ¼öÁ¤ÇÏ¿© password¸¦ ³ª¿ÀÁö ¾Êµµ·Ï(mangle)ÇÒ ¼ö ÀÖ½À´Ï´Ù. (³×Æ®¿öÅ© ³»¿¡ µ¥ºñ¾ÈÀÌ ¾Æ´Ñ slave serverµéÀÌ ÀÖÀ» ¶§¿¡´Â ÀÌ°ÍÀ» »ç¿ëÇؼ´Â ¾ÈµË´Ï´Ù.)
/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 ¸ÊÀ» À¯ÁöÇϵµ·Ï ÇÏ´Â °ÍÀÌ Àû´çÇÕ´Ï´Ù.