22.9. NIS/YP

¸¶ºî: Bill Swingle. Äɵ­: Eric Ogren 、 Udo Erdelhoff.

22.9.1. NIS/YP ¤È¤Ï?

NIS ¤È¤Ï Network Information Services ¤Îά¤Ç Sun Microsystems ¤Ë¤è¤Ã¤Æ UNIX® ¤Î (¤â¤È¤â¤È¤Ï SunOS™ ¤Î) ½¸Ãæ´ÉÍý¤Î¤¿¤á¤Ë³«È¯¤µ¤ì¤Þ¤·¤¿¡£¸½ºß¤Ç¤Ï»ö¼Â¾å¤Î¶È³¦É¸½à¤Ë¤Ê¤Ã¤Æ¤ª¤ê¡¢ ¼çÍ×¤Ê UNIX ¥é¥¤¥¯¥·¥¹¥Æ¥à (Solaris™, HP-UX, AIX®, Linux, NetBSD, OpenBSD, FreeBSD¡¢Åù¡¹) ¤Ï¤¹¤Ù¤Æ¤³¤ì¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£

NIS ¤Ï¸µ¡¹¡¢¥¤¥¨¥í¡¼¥Ú¡¼¥¸¤È¤¤¤Ã¤Æ¤¤¤Þ¤·¤¿¤¬¡¢ ¾¦É¸ÌäÂ꤫¤é Sun ¤Ï¤½¤Î̾Á°¤òÊѤ¨¤Þ¤·¤¿¡£ ¸Å¤¤ÍѸì (¤ª¤è¤Ó yp) ¤Ï¤Þ¤À¤è¤¯¸«¤é¤ì¡¢»ÈÍѤµ¤ì¤Æ¤¤¤Þ¤¹¡£

NIS ¤Ï RPC ¤ò»È¤Ã¤¿¥¯¥é¥¤¥¢¥ó¥È/¥µ¡¼¥Ð¥·¥¹¥Æ¥à¤Ç¤¹¡£ ¤³¤ì¤ò»È¤¦¤È NIS ¥É¥á¥¤¥óÆâ¤Î¥Þ¥·¥ó´Ö¤Ç¡¢ ¶¦Ä̤ÎÀßÄê¥Õ¥¡¥¤¥ë¤ò¶¦Í­¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¤Þ¤¿ NIS ¤ò»È¤¦¤³¤È¤Ç¥·¥¹¥Æ¥à´ÉÍý¼Ô¤ÏºÇ¾®¸Â¤ÎÀßÄê¥Ç¡¼¥¿¤Ç NIS ¥¯¥é¥¤¥¢¥ó¥È¤òΩ¤Á¾å¤²¤ë¤³¤È¤¬¤Ç¤­¡¢ 1 ¥ö½ê¤«¤éÀßÄê¥Ç¡¼¥¿¤ÎÄɲᢺï½ü¡¢Êѹ¹¤¬²Äǽ¤Ç¤¹¡£

NIS ¤Ï Windows NT® ¤Î¥É¥á¥¤¥ó¥·¥¹¥Æ¥à¤Ë»÷¤Æ¤¤¤Þ¤¹¡£ ÆâÉô¤Î¼ÂÁõ¤Ï»÷¤Æ¤â»÷¤Ä¤«¤Ê¤¤¤â¤Î¤Ç¤¹¤¬¡¢ ´ðËÜŪ¤Êµ¡Ç½¤òÂÐÈ椹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤¹¡£

22.9.2. ÃΤäƤª¤¯¤Ù¤­ÍѸì / ¥×¥í¥»¥¹

NIS ¥µ¡¼¥Ð¤ÎΩ¤Á¾å¤²¤ä NIS ¥¯¥é¥¤¥¢¥ó¥È¤ÎÀßÄê¤Ê¤É¡¢ NIS ¤ò FreeBSD ¤ËƳÆþ¤¹¤ë¤Ë¤¢¤¿¤Ã¤Æ¡¢ Ìܤˤ¹¤ë¤Ç¤¢¤í¤¦ÍѸì¤ä½ÅÍפʥ桼¥¶¥×¥í¥»¥¹¤¬¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹¡£

ÍѸì ÀâÌÀ
NIS ¥É¥á¥¤¥ó̾ NIS ¥Þ¥¹¥¿¥µ¡¼¥Ð¤È¤½¤Î¥¯¥é¥¤¥¢¥ó¥È¤¹¤Ù¤Æ (¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤ò´Þ¤à) ¤Ë¤Ï NIS ¥É¥á¥¤¥ó̾¤¬¤Ä¤¤¤Æ¤¤¤Þ¤¹¡£ Windows NT ¥É¥á¥¤¥ó̾¤ÈƱÍͤˡ¢NIS ¥É¥á¥¤¥ó̾¤Ï DNS ¤È¤Ï²¿¤Î´Ø·¸¤â¤¢¤ê¤Þ¤»¤ó¡£
portmap RPC (Remote Procedure Call, NIS ¤Ç»ÈÍѤµ¤ì¤ë¥Í¥Ã¥È¥ï¡¼¥¯¥×¥í¥È¥³¥ë) ¤òÍøÍѤ¹¤ë¤¿¤á¤Ë¼Â¹Ô¤·¤Æ¤ª¤«¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ portmap ¤¬Æ°ºî¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢ NIS ¥µ¡¼¥Ð¤òµ¯Æ°¤¹¤ë¤³¤È¤â¡¢ NIS ¥¯¥é¥¤¥¢¥ó¥È¤È¤·¤ÆÆ°ºî¤µ¤»¤ë¤³¤È¤â¤Ç¤­¤Þ¤»¤ó¡£
ypbind NIS ¥¯¥é¥¤¥¢¥ó¥È¤ò NIS ¥µ¡¼¥Ð¤Ë “·ë¤Ó¤Ä¤±” ¤Þ¤¹¡£ ¤³¤ì¤Ï NIS ¥É¥á¥¤¥ó̾¤ò¥·¥¹¥Æ¥à¤«¤é¼èÆÀ¤· RPC ¤òÍѤ¤¤Æ¥µ¡¼¥Ð¤ËÀܳ¤·¤Þ¤¹¡£ypbind ¤Ï NIS ´Ä¶­¤Ë¤ª¤±¤ë¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð´Ö¤ÎÄÌ¿®¤ÎÃæ¿õ¤Ç¤¹¡£ ¥¯¥é¥¤¥¢¥ó¥È¥Þ¥·¥ó¤Î ypbind ¤¬Ää»ß¤·¤¿¾ì¹ç¤Ï¡¢NIS ¥µ¡¼¥Ð¤Ø¥¢¥¯¥»¥¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£
ypserv ¤Ï NIS ¥µ¡¼¥Ð¤Ç¤Î¤ß¼Â¹Ô¤µ¤ì¤ë¤Ù¤­¤â¤Î¤Ç¡¢ NIS ¥µ¡¼¥Ð¥×¥í¥»¥¹¤½¤Î¤â¤Î¤Ç¤¹¡£ypserv(8) ¤¬Ää»ß¤·¤¿¾ì¹ç¡¢¥µ¡¼¥Ð¤Ï¤â¤Ï¤ä NIS ¥ê¥¯¥¨¥¹¥È¤Ë±þÅú¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¯¤Ê¤ë¤Ç¤·¤ç¤¦ (¤Ç¤­¤ì¤Ð¡¢¸å¤ò°ú¤­·Ñ¤°¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤¬¤¢¤ë¤È¤è¤¤¤Ç¤·¤ç¤¦)¡£ º£¤Þ¤Ç»È¤Ã¤Æ¤¤¤¿¥µ¡¼¥Ð¤¬µ¡Ç½¤òÄä»ß¤·¤¿¤È¤­¡¢ Ê̤Υµ¡¼¥Ð¤ËºÆÀܳ¤·¤Ë¹Ô¤«¤Ê¤¤ NIS ¤Î¼ÂÁõ¤â¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹ (FreeBSD ¤Î¤â¤Î¤Ï°ã¤¤¤Þ¤¹)¡£ ¤½¤Î¤è¤¦¤Ê¾ì¹ç¤ËÉüµ¢¤¹¤ë¤¿¤á¤ÎÍ£°ì¤ÎÊýË¡¤Ï¡¢ ¥µ¡¼¥Ð¥×¥í¥»¥¹ (¤¢¤ë¤¤¤Ï¥µ¡¼¥ÐÁ´ÂÎ)¡¢¤â¤·¤¯¤Ï¥¯¥é¥¤¥¢¥ó¥È¤Î ypbind ¥×¥í¥»¥¹¤òºÆ¥¹¥¿¡¼¥È¤¹¤ë¤³¤È¤Ç¤¹¡£
rpc.yppasswdd NIS ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤ÇÆ°¤«¤¹¤Ù¤­¡¢ ¤â¤¦°ì¤Ä¤Î¥×¥í¥»¥¹¤Ç¤¹¡£¤³¤ì¤Ï NIS ¥¯¥é¥¤¥¢¥ó¥È¤¬ NIS ¥Ñ¥¹¥ï¡¼¥É¤òÊѹ¹¤¹¤ë¤³¤È¤ò²Äǽ¤Ë¤¹¤ë¥Ç¡¼¥â¥ó¤Ç¤¹¡£ ¤³¤Î¥Ç¡¼¥â¥ó¤¬Æ°ºî¤·¤Æ¤¤¤Ê¤¤¤È¤­¤Ï¡¢ ¥æ¡¼¥¶¤Ï NIS ¥Þ¥¹¥¿¥µ¡¼¥Ð¤Ë¥í¥°¥¤¥ó¤·¡¢ ¤½¤³¤Ç¥Ñ¥¹¥ï¡¼¥É¤òÊѹ¹¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£

22.9.3. Æ°ºî¤Î¤·¤¯¤ß

NIS ´Ä¶­¤Ë¤¢¤ë¥Û¥¹¥È¤Ï¡¢ ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¡¢¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¡¢¥¯¥é¥¤¥¢¥ó¥È¤Î 3 ¼ïÎà¤ËʬÎव¤ì¤Þ¤¹¡£ ¥µ¡¼¥Ð¤Ï¡¢¥Û¥¹¥È¤ÎÀßÄê¾ðÊó¤ÎÃ濴Ū¤Ê¾ðÊó³ÊǼ¸Ë¤ÎÌò³ä¤ò¤·¤Þ¤¹¡£ ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤Ï¸µ¤È¤Ê¤ë¿®Íê¤Ç¤­¤ë¾ðÊó¤òÊÝ»ý¤·¡¢ ¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤Ï¾éĹÀ­¤ò³ÎÊݤ¹¤ë¤¿¤á¤³¤Î¾ðÊó¤ò¥ß¥é¡¼¤·¤Þ¤¹¡£ ¤½¤·¤Æ¥¯¥é¥¤¥¢¥ó¥È¤Ï¡¢¥µ¡¼¥Ð¤«¤é¾ðÊó¤ÎÄ󶡤ò¼õ¤±¤ÆÆ°ºî¤·¤Þ¤¹¡£

¤³¤ÎÊýË¡¤òÍѤ¤¤ë¤³¤È¤Ç¡¢¿ô¿¤¯¤Î¥Õ¥¡¥¤¥ë¤Ë¤¢¤ë¾ðÊ󤬶¦Í­¤Ç¤­¤Þ¤¹¡£ ¤è¤¯ NIS ¤Ç¶¦Í­¤µ¤ì¤ë¤Î¤Ï¡¢ master.passwd ¤ä group, hosts ¤È¤¤¤Ã¤¿¥Õ¥¡¥¤¥ë¤Ç¤¹¡£ ¥¯¥é¥¤¥¢¥ó¥È¾å¤Î¥×¥í¥»¥¹¤¬¡¢ Ä̾ï¤Ê¤é¥í¡¼¥«¥ë¤Î¥Õ¥¡¥¤¥ë¤Ë¤¢¤ë¾ðÊó¤òɬÍפȤ¹¤ë¤È¤­¤Ï¡¢ ¥¯¥é¥¤¥¢¥ó¥È¤ÏÂå¤ï¤ê¤ËÀܳ¤·¤Æ¤¤¤ë NIS ¥µ¡¼¥Ð¤ËÌ䤤¹ç¤ï¤»¤ò¹Ô¤¤¤Þ¤¹¡£

22.9.3.1. ¥Þ¥·¥ó¤ÎʬÎà

  • NIS ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¡£ ¤³¤Î¥µ¡¼¥Ð¤Ï Windows NT ¤Ç¸À¤¦¤È¤³¤í¤Î¥×¥é¥¤¥Þ¥ê¥É¥á¥¤¥ó¥³¥ó¥È¥í¡¼¥é¤Ë¤¢¤¿¤ê¤Þ¤¹¡£ ¤¹¤Ù¤Æ¤Î NIS ¥¯¥é¥¤¥¢¥ó¥È¤ÇÍøÍѤµ¤ì¤ë¥Õ¥¡¥¤¥ë¤òÊݼ餷¤Þ¤¹¡£ passwd ¤ä group¡¢ ¤½¤Î¾ NIS ¥¯¥é¥¤¥¢¥ó¥È¤¬»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¤Ï¡¢ ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤Ë¤¢¤ê¤Þ¤¹¡£

    注意: °ì¤Ä¤Î¥Þ¥·¥ó¤¬°ì¤Ä°Ê¾å¤Î NIS ¥É¥á¥¤¥ó¤Î¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤Ë¤Ê¤ë¤³¤È¤Ï²Äǽ¤Ç¤¹¡£ ¤·¤«¤·¡¢¤³¤³¤Ç¤ÏÈæ³ÓŪ¾®µ¬ÌϤΠNIS ´Ä¶­¤òÂоݤȤ·¤Æ¤¤¤ë¤¿¤á¡¢ ¤½¤Î¤è¤¦¤Ê¾ì¹ç¤Ë¤Ä¤¤¤Æ¤Ï°·¤¤¤Þ¤»¤ó¡£

  • NIS ¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¡£ Windows NT ¤Î¥Ð¥Ã¥¯¥¢¥Ã¥×¥É¥á¥¤¥ó¥³¥ó¥È¥í¡¼¥é¤Ë»÷¤¿¤â¤Î¤Ç¡¢ NIS ¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤Ï NIS ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤Î¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë¤Î¥³¥Ô¡¼¤òÊÝ»ý¤·¤Þ¤¹¡£ NIS ¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤Ï½ÅÍפʴĶ­¤ÇɬÍפȤµ¤ì¤ë¾éĹÀ­¤òÄ󶡤·¡¢ ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤ÎÉé²Ù¤Î¥Ð¥é¥ó¥¹¤ò¤È¤ê¤Þ¤¹¡£ NIS ¥¯¥é¥¤¥¢¥ó¥È¤Ï¾ï¤ËºÇ½é¤Ë¥ì¥¹¥Ý¥ó¥¹¤òÊÖ¤·¤¿¥µ¡¼¥Ð¤ò NIS ¥µ¡¼¥Ð¤È¤·¤ÆÀܳ¤·¤Þ¤¹¤¬¡¢ ¤³¤ì¤Ë¤Ï¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤â´Þ¤Þ¤ì¤Þ¤¹¡£

  • NIS ¥¯¥é¥¤¥¢¥ó¥È¡£ NIS ¥¯¥é¥¤¥¢¥ó¥È¤ÏÂçÉôʬ¤Î Windows NT ¥ï¡¼¥¯¥¹¥Æ¡¼¥·¥ç¥ó¤Î¤è¤¦¤Ë¡¢¥í¥°¥ª¥ó¤ËºÝ¤·¤Æ NIS ¥µ¡¼¥Ð (Windows NT ¥ï¡¼¥¯¥¹¥Æ¡¼¥·¥ç¥ó¤Î¾ì¹ç¤Ï Windows NT ¥É¥á¥¤¥ó¥³¥ó¥È¥í¡¼¥é) ¤ËÀܳ¤·¤Æǧ¾Ú¤·¤Þ¤¹¡£

22.9.4. NIS/YP ¤ò»È¤¦

¤³¤ÎÀá¤Ç¤Ï NIS ´Ä¶­¤ÎΩ¤Á¾å¤²Îã¤ò¼è¤ê¾å¤²¤Þ¤¹¡£

注意: ¤³¤ÎÀá¤Ç¤Ï¤¢¤Ê¤¿¤¬ FreeBSD 3.3 °Ê¹ß¤ò»È¤Ã¤Æ¤¤¤ë¤â¤Î¤È¤·¤Þ¤¹¡£ ¤³¤³¤ÇÍ¿¤¨¤é¤ì¤ë»Ø¼¨¤Ï ¤ª¤½¤é¤¯ FreeBSD ¤Î 3.0 °Ê¹ß¤Î¤É¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤âµ¡Ç½¤¹¤ë¤Ç¤·¤ç¤¦¤¬¡¢ ¤½¤ì¤òÊݾڤ¹¤ë¤â¤Î¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£

22.9.4.1. ·×²è¤òΩ¤Æ¤ë

¤¢¤Ê¤¿¤¬Âç³Ø¤Î¾®¤µ¤Ê¸¦µæ¼¼¤Î´ÉÍý¿Í¤Ç¤¢¤ë¤È¤·¤Þ¤·¤ç¤¦¡£ ¤³¤Î¸¦µæ¼¼¤Ï 15 Âæ¤Î FreeBSD ¥Þ¥·¥ó¤«¤é¤Ê¤Ã¤Æ¤¤¤Æ¡¢ ¸½ºß¤Ï¤Þ¤À½¸Ãæ´ÉÍý¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£ ¤¹¤Ê¤ï¤Á¡¢³Æ¥Þ¥·¥ó¤Ï /etc/passwd ¤È /etc/master.passwd ¤ò³Æ¡¹¤¬»ý¤Ã¤Æ¤¤¤Þ¤¹¡£ ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï¼êÆ°¤Ç¤ª¸ß¤¤¤ËƱ´ü¤µ¤»¤Æ¤¤¤Þ¤¹¡£ ¤Ä¤Þ¤ê¸½»þÅÀ¤Ç¤Ï¡¢¿·¤·¤¤¥æ¡¼¥¶¤ò¤¢¤Ê¤¿¤¬Äɲ乤ë¤È¤­¡¢ adduser ¤ò 15 ¥ö½ê¤¹¤Ù¤Æ¤Ç¼Â¹Ô¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ ¤³¤ì¤ÏÌÀ¤é¤«¤ËÊѤ¨¤ëɬÍפ¬¤¢¤ë¤¿¤á¡¢ ¤¢¤Ê¤¿¤Ï¤³¤Î¤¦¤Á 2 Âæ¤ò¥µ¡¼¥Ð¤Ë¤·¤Æ NIS ¤òƳÆþ¤¹¤ë¤³¤È¤ò·è¤á¤Þ¤·¤¿¡£

¤½¤Î·ë²Ì¡¢¸¦µæ¼¼¤ÎÀßÄê¤Ï¤³¤Î¤è¤¦¤Ê¤â¤Î¤Ë¤Ê¤ê¤Þ¤¹¡£

¥Þ¥·¥ó¤Î̾Á° IP ¥¢¥É¥ì¥¹ Ìò³ä
ellington 10.0.0.2 NIS ¥Þ¥¹¥¿
coltrane 10.0.0.3 NIS ¥¹¥ì¡¼¥Ö
basie 10.0.0.4 ¶µ°÷ÍѤΥ¥¯¥¹¥Æ¡¼¥·¥ç¥ó
bird 10.0.0.5 ¥¯¥é¥¤¥¢¥ó¥È¥Þ¥·¥ó
cli[1-11] 10.0.0.[6-17] ¤½¤Î¾¤Î¥¯¥é¥¤¥¢¥ó¥È¥Þ¥·¥ó

¤â¤· NIS ¤Ë¤è¤ë¥·¥¹¥Æ¥à´ÉÍý¤ÎÀßÄê¤ò¹Ô¤Ê¤¦¤Î¤¬½é¤á¤Æ¤Ê¤é¡¢ ¤É¤Î¤è¤¦¤Ë¤·¤¿¤¤¤Î¤«¡¢ ¤Ò¤È¤È¤ª¤êºÇ¸å¤Þ¤Ç¹Í¤¨¤Æ¤ß¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£ ¥Í¥Ã¥È¥ï¡¼¥¯¤Îµ¬ÌϤˤè¤é¤º¡¢ ¤¤¤¯¤Ä¤«·è¤á¤ë¤Ù¤­¤³¤È¤¬¤¢¤ë¤«¤é¤Ç¤¹¡£

22.9.4.1.1. NIS ¥É¥á¥¤¥ó̾¤ò·è¤á¤ë

¤³¤³¤Ç¤¤¤¦¥É¥á¥¤¥ó̾¤Ï¡¢º£¤Þ¤Ç¤¢¤Ê¤¿¤¬»È¤Ã¤Æ¤¤¤¿¡¢ ¤¤¤ï¤æ¤ë “¥É¥á¥¤¥ó̾” ¤È¸Æ¤ó¤Ç¤¤¤¿¤â¤Î¤È¤Ï°ã¤¤¤Þ¤¹¡£ Àµ³Î¤Ë¤Ï “NIS ¥É¥á¥¤¥ó̾” ¤È¸Æ¤Ð¤ì¤Þ¤¹¡£ ¥¯¥é¥¤¥¢¥ó¥È¤¬¥µ¡¼¥Ð¤Ë¾ðÊó¤òÍ׵᤹¤ë¤È¤­¡¢ ¤½¤ÎÍ×µá¤Ë¤Ï¼«Ê¬¤¬Â°¤¹¤ë NIS ¥É¥á¥¤¥ó¤Î̾Á°¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ ¤³¤ì¤Ï 1 ¤Ä¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤ËÊ£¿ô¤Î¥µ¡¼¥Ð¤¬¤¢¤ë¾ì¹ç¤Ë¡¢ ¤É¤Î¥µ¡¼¥Ð¤¬Í×µá¤ò½èÍý¤¹¤ì¤ÐÎɤ¤¤«¤ò·è¤á¤ë¤¿¤á¤Ë»È¤ï¤ì¤Þ¤¹¡£ NIS ¥É¥á¥¤¥ó̾¤È¤Ï¡¢ ´ØÏ¢¤Î¤¢¤ë¥Û¥¹¥È¤ò¥°¥ë¡¼¥×²½¤¹¤ë¤¿¤á¤Î̾Á°¤Ç¤¢¤ë¡¢ ¤È¹Í¤¨¤ë¤ÈÎɤ¤¤Ç¤·¤ç¤¦¡£

ÁÈ¿¥¤Ë¤è¤Ã¤Æ¤Ï¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Î¥É¥á¥¤¥ó̾¤ò NIS ¥É¥á¥¤¥ó̾¤Ë»È¤Ã¤Æ¤¤¤ë¤È¤³¤í¤¬¤¢¤ê¤Þ¤¹¡£ ¤³¤ì¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¤Î¥È¥é¥Ö¥ë¤ò¥Ç¥Ð¥Ã¥°¤¹¤ë¤È¤­¤Ëº®Íð¤Î¸¶°ø¤È¤Ê¤ë¤¿¤á¡¢ ¤ª´«¤á¤Ç¤­¤Þ¤»¤ó¡£ NIS ¥É¥á¥¤¥ó̾¤Ï¥Í¥Ã¥È¥ï¡¼¥¯Æâ¤Ç°ì°Õ¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó¡£¤½¤·¤Æ¡¢ ¥É¥á¥¤¥ó̾¤¬¥É¥á¥¤¥ó¤Ë´Þ¤Þ¤ì¤ë¥Þ¥·¥ó¤òɽ¤¹¤è¤¦¤Ê¤â¤Î¤Ç¤¢¤ì¤Ðʬ¤«¤ê°×¤¤¤Ç¤¹¡£ ¤¿¤È¤¨¤Ð Acme ¼Ò¤Î¥¢¡¼¥È (Art) ÉôÌç¤Ç¤¢¤ì¤Ð NIS ¥É¥á¥¤¥ó̾¤ò “acme-art” ¤È¤¹¤ì¤ÐÎɤ¤¤Ç¤·¤ç¤¦¡£¤³¤ÎÎã¤Ç¤Ï NIS ¥É¥á¥¤¥ó̾¤È¤·¤Æ test-domain ¤ò»ÈÍѤ·¤Þ¤¹¡£

¤·¤«¤·¤Ê¤¬¤é¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤Ë¤è¤Ã¤Æ¤Ï (ÆÃ¤Ë SunOS)¡¢ NIS ¥É¥á¥¤¥ó̾¤ò¥Í¥Ã¥È¥ï¡¼¥¯¥É¥á¥¤¥ó̾¤È¤·¤Æ»È¤¦¤â¤Î¤â¤¢¤ê¤Þ¤¹¡£ ¤¢¤Ê¤¿¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¤½¤Î¤è¤¦¤ÊÀ©¸Â¤Î¤¢¤ë¥Þ¥·¥ó¤¬ 1 Âæ¤Ç¤â¤¢¤ë¤È¤­¤Ï¡¢NIS ¤Î¥É¥á¥¤¥ó̾¤È¤·¤Æ¥¤¥ó¥¿¡¼¥Í¥Ã¥È¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥É¥á¥¤¥ó̾¤ò»È¤ï¤Ê¤±¤ì¤Ð ¤¤¤±¤Þ¤»¤ó¡£

22.9.4.1.2. ¥µ¡¼¥Ð¥Þ¥·¥ó¤ÎʪÍýŪɬÍ×¾ò·ï

NIS ¥µ¡¼¥Ð¤È¤·¤Æ»È¤¦¥Þ¥·¥ó¤òÁª¤ÖºÝ¤Ë¤Ï¡¢ ¤¤¤¯¤Ä¤«Ãí°Õ¤¹¤Ù¤­ÅÀ¤¬¤¢¤ê¤Þ¤¹¡£ NIS ¤Ë´Ø¤¹¤ëº¤¤Ã¤¿¤³¤È¤Î°ì¤Ä¤Ë¡¢ ¥¯¥é¥¤¥¢¥ó¥È¤Î¥µ¡¼¥Ð¤Ø¤Î°Í¸ÅÙ¤¬¤¢¤ê¤Þ¤¹¡£ ¥¯¥é¥¤¥¢¥ó¥È¤¬¼«Ê¬¤Î NIS ¥É¥á¥¤¥ó¤Î¥µ¡¼¥Ð¤ËÀܳ¤Ç¤­¤Ê¤¤¤È¡¢ ¥Þ¥·¥ó¤¬»ÈÍÑÉÔǽ¤Ë¤Ê¤ë¤³¤È¤¬¤¢¤Þ¤ê¤Ë¿¤¤¤Î¤Ç¤¹¡£ ¤â¤·¡¢¥æ¡¼¥¶¤ä¥°¥ë¡¼¥×¤Ë´Ø¤¹¤ë¾ðÊó¤¬ÆÀ¤é¤ì¤Ê¤±¤ì¤Ð¡¢ ¤Û¤È¤ó¤É¤Î¥·¥¹¥Æ¥à¤Ï°ì»þŪ¤ËÄä»ß¤·¤Æ¤·¤Þ¤¤¤Þ¤¹¡£ ¤³¤¦¤¤¤Ã¤¿¤³¤È¤òǰƬ¤ËÃÖ¤¤¤Æ¡¢ÉÑÈˤ˥ê¥Ö¡¼¥È¤µ¤ì¤ë¥Þ¥·¥ó¤ä¡¢ ³«È¯¤Ë»È¤ï¤ì¤½¤¦¤Ê¥Þ¥·¥ó¤òÁª¤Ð¤Ê¤¤¤è¤¦¤Ë¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ ÍýÁÛŪ¤Ë¤Ï NIS ¥µ¡¼¥Ð¤Ï¥¹¥¿¥ó¥É¥¢¥í¥ó¤Ç NIS ¥µ¡¼¥ÐÀìÍѤΥޥ·¥ó¤Ë¤¹¤ë¤Ù¤­¤Ç¤¹¡£ ¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÉé²Ù¤¬½Å¤¯¤Ê¤±¤ì¤Ð¡¢ ¾¤Î¥µ¡¼¥Ó¥¹¤òÁö¤é¤»¤Æ¤¤¤ë¥Þ¥·¥ó¤ò NIS ¥µ¡¼¥Ð¤Ë¤·¤Æ¤â¤«¤Þ¤¤¤Þ¤»¤ó¡£ ¤¿¤À¤· NIS ¥µ¡¼¥Ð¤¬»È¤¨¤Ê¤¯¤Ê¤ë¤È¡¢ ¤¹¤Ù¤Æ¤Î ¥¯¥é¥¤¥¢¥ó¥È¤Ë±Æ¶Á¤ò¤ª¤è¤Ü¤¹¡¢ ¤È¤¤¤¦ÅÀ¤Ë¤ÏÃí°Õ¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£

22.9.4.2. NIS ¥µ¡¼¥Ð

¸µ¤È¤Ê¤ë¤¹¤Ù¤Æ¤Î NIS ¾ðÊó¤Ï¡¢ NIS ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤È¸Æ¤Ð¤ì¤ë 1 Âæ¤Î¥Þ¥·¥ó¤Ë³ÊǼ¤µ¤ì¤Þ¤¹¡£ ¤³¤Î¾ðÊ󤬳ÊǼ¤µ¤ì¤ë¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò NIS ¥Þ¥Ã¥×¤È¸Æ¤Ó¤Þ¤¹¡£ FreeBSD ¤Ç¤Ï¡¢¤³¤Î¥Þ¥Ã¥×¤Ï /var/yp/[domainname] ¤ËÃÖ¤«¤ì¤Þ¤¹¡£ [domainname] ¤Ï¡¢ ¥µ¡¼¥Ð¤¬¥µ¡¼¥Ó¥¹¤¹¤ë NIS ¥É¥á¥¤¥ó¤Ç¤¹¡£ 1 Âæ¤Î NIS ¥µ¡¼¥Ð¤¬Ê£¿ô¤Î¥É¥á¥¤¥ó¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£ ¤Ä¤Þ¤ê¡¢¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ò³Æ¡¹¤Î¥É¥á¥¤¥ó¤´¤È¤Ëºî¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¤½¤ì¤¾¤ì¤Î¥É¥á¥¤¥ó¤Ï¡¢ ÆÈΩ¤·¤¿¥Þ¥Ã¥×¤Î½¸¹ç¤ò»ý¤Ä¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£

NIS ¤Î¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤È¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¾å¤Ç¤Ï¡¢ ypserv ¥Ç¡¼¥â¥ó¤¬¤¹¤Ù¤Æ¤Î NIS Í×µá¤ò½èÍý¤·¤Þ¤¹¡£ ypserv ¤Ï NIS ¥¯¥é¥¤¥¢¥ó¥È¤«¤é¤ÎÍ×µá¤ò¼õ¤±ÉÕ¤±¡¢ ¥É¥á¥¤¥ó̾¤È¥Þ¥Ã¥×̾¤òÂбþ¤¹¤ë¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë¤Ø¤Î¥Ñ¥¹¤ËÊÑ´¹¤·¡¢ ¥Ç¡¼¥¿¤ò¥¯¥é¥¤¥¢¥ó¥È¤ËÊÖÁ÷¤·¤Þ¤¹¡£

22.9.4.2.1. NIS ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤ÎÀßÄê

¤ä¤ê¤¿¤¤¤³¤È¤Ë¤â¤è¤ê¤Þ¤¹¤¬ NIS ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤ÎÀßÄê¤ÏÈæ³ÓŪñ½ã¤Ç¤¹¡£ FreeBSD ¤Ï½é´ü¾õÂÖ¤Ç NIS ¤ËÂбþ¤·¤Æ¤¤¤Þ¤¹¡£ ɬÍפʤΤϰʲ¼¤Î¹Ô¤ò /etc/rc.conf ¤ËÄɲ乤뤳¤È¤À¤±¤Ç¡¢ ¤¢¤È¤Ï FreeBSD ¤¬¤ä¤Ã¤Æ¤¯¤ì¤Þ¤¹¡£

  1. nisdomainname="test-domain"
    
    ¤³¤Î¹Ô¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÀßÄê¸å¤Ë (¤¿¤È¤¨¤ÐºÆµ¯Æ°¸å¤Ë) NIS ¤Î¥É¥á¥¤¥ó̾¤ò test-domain ¤ËÀßÄꤷ¤Þ¤¹¡£

  2. nis_server_enable="YES"
    
    ¤³¤ì¤Ï FreeBSD ¤Ë¼¡¤Ë¥Í¥Ã¥È¥ï¡¼¥¯¤¬Î©¤Á¾å¤¬¤Ã¤¿¤È¤­ NIS ¤Î¥µ¡¼¥Ð¥×¥í¥»¥¹¤òµ¯Æ°¤µ¤»¤Þ¤¹¡£

  3. nis_yppasswdd_enable="YES"
    
    ¤³¤ì¤Ï rpc.yppasswdd ¥Ç¡¼¥â¥ó¤òÍ­¸ú¤Ë¤·¤Þ¤¹¡£¾å½Ò¤·¤¿¤è¤¦¤Ë¤³¤ì¤Ï¥æ¡¼¥¶¤¬ NIS ¤Î¥Ñ¥¹¥ï¡¼¥É¤ò¥¯¥é¥¤¥¢¥ó¥È¤Î¥Þ¥·¥ó¤«¤éÊѹ¹¤¹¤ë¤³¤È¤ò²Äǽ¤Ë¤·¤Þ¤¹¡£

注意: NIS ¤ÎÀßÄê¤Ë¤è¤Ã¤Æ¤Ï¡¢ ¤µ¤é¤Ë¾¤Î¥¨¥ó¥È¥ê¤òÉÕ¤±²Ã¤¨¤ëɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ ¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï¡¢²¼µ­¤Î NIS ¥¯¥é¥¤¥¢¥ó¥È¤È¤·¤Æ¤âÆ°ºî¤·¤Æ¤¤¤ë NIS ¥µ¡¼¥Ð Àá¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£

¤µ¤Æ¡¢¤¢¤È¤Ï¥¹¡¼¥Ñ¥æ¡¼¥¶¸¢¸Â¤Ç /etc/netstart ¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ë¤À¤±¤Ç¤¹¡£ ¤³¤ì¤Ë¤è¤ê /etc/rc.conf ¤ÇÄêµÁ¤µ¤ì¤¿Ãͤò»È¤Ã¤Æ¤¹¤Ù¤Æ¤ÎÀßÄ꤬¹Ô¤Ê¤ï¤ì¤Þ¤¹¡£

22.9.4.2.2. NIS ¥Þ¥Ã¥×¤Î½é´ü²½

NIS ¥Þ¥Ã¥× ¤È¤Ï /var/yp ¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤¢¤ë¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë¤Ç¤¹¡£ ¤³¤ì¤é¤Ï NIS ¥Þ¥¹¥¿¤Î /etc ¥Ç¥£¥ì¥¯¥È¥ê¤ÎÀßÄê¥Õ¥¡¥¤¥ë¤«¤éºî¤é¤ì¤Þ¤¹¡£ Í£°ì¤ÎÎã³°¤Ï /etc/master.passwd ¥Õ¥¡¥¤¥ë¤Ç¤¹¡£¤³¤ì¤Ï root ¤ä¾¤Î´ÉÍýÍÑ¥¢¥«¥¦¥ó¥È¤Î¥Ñ¥¹¥ï¡¼¥É¤Þ¤Ç¤½¤Î NIS ¥É¥á¥¤¥ó¤Î¤¹¤Ù¤Æ¤Î¥µ¡¼¥Ð¤ËÅÁ¤¨¤¿¤¯¤Ê¤¤¤È¤¤¤¦¡¢ ¤â¤Ã¤È¤â¤ÊÍýͳ¤Ë¤è¤ë¤â¤Î¤Ç¤¹¡£¤³¤Î¤¿¤á NIS ¥Þ¥Ã¥×¤Î½é´ü²½¤ÎÁ°¤Ë°Ê²¼¤ò¹Ô¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡£

# cp /etc/master.passwd /var/yp/master.passwd
# cd /var/yp
# vi master.passwd

¥·¥¹¥Æ¥à¤Ë´Ø¤¹¤ë¥¢¥«¥¦¥ó¥È (bin, tty, kmem, games ¤Ê¤É) ¤ä¡¢NIS ¥¯¥é¥¤¥¢¥ó¥È¤ËÅÁ¤¨¤¿¤¯¤Ê¤¤¥¢¥«¥¦¥ó¥È (¤¿¤È¤¨¤Ð root ¤ä¾¤Î UID ¤¬ 0 (¥¹¡¼¥Ñ¥æ¡¼¥¶) ¤Î¥¢¥«¥¦¥ó¥È) ¤ò¤¹¤Ù¤Æ NIS ¥Þ¥Ã¥×¤«¤é¼è¤ê½ü¤«¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£

注意: /var/yp/master.passwd ¤¬ ¥°¥ë¡¼¥×¤Þ¤¿¤Ïï¤â¤¬Æɤá¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Ê¤¤¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤ (¥â¡¼¥É 600)! ɬÍפʤé chmod ¥³¥Þ¥ó¥É¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£

¤¹¤Ù¤Æ¤¬½ª¤ï¤Ã¤¿¤é NIS ¥Þ¥Ã¥×¤ò½é´ü²½¤·¤Þ¤¹! FreeBSD ¤Ë¤Ï¡¢¤³¤ì¤ò¹Ô¤¦¤¿¤á¤Ë ypinit ¤È¤¤¤¦Ì¾¤Î¥¹¥¯¥ê¥×¥È¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹ (¾ÜºÙ¤Ï¤½¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ò¤´Í÷¤¯¤À¤µ¤¤)¡£ ¤³¤Î¥¹¥¯¥ê¥×¥È¤Ï¤Û¤È¤ó¤É¤Î UNIX OS ¤Ë¸ºß¤·¤Þ¤¹¤¬¡¢ ¤¹¤Ù¤Æ¤È¤Ï¸Â¤é¤Ê¤¤¤³¤È¤ò³Ð¤¨¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤¡£ Digital Unix/Compaq Tru64 UNIX ¤Ç¤Ï ypsetup ¤È¸Æ¤Ð¤ì¤Æ¤¤¤Þ¤¹¡£NIS ¥Þ¥¹¥¿¤Î¤¿¤á¤Î¥Þ¥Ã¥×¤òºî¤ë¤¿¤á¤Ë¤Ï -m ¥ª¥×¥·¥ç¥ó¤ò ypinit ¤ËÍ¿¤¨¤Þ¤¹¡£¾å½Ò¤Î¥¹¥Æ¥Ã¥×¤ò´°Î»¤·¤Æ¤¤¤ë¤Ê¤é¡¢°Ê²¼¤ò¼Â¹Ô¤·¤Æ NIS ¥Þ¥Ã¥×¤òÀ¸À®¤·¤Þ¤¹¡£

ellington# ypinit -m test-domain
Server Type: MASTER Domain: test-domain
Creating an YP server will require that you answer a few questions.
Questions will all be asked at the beginning of the procedure.
Do you want this procedure to quit on non-fatal errors? [y/n: n] n
Ok, please remember to go back and redo manually whatever fails.
If you don't, something might not work.
At this point, we have to construct a list of this domains YP servers.
rod.darktech.org is already known as master server.
Please continue to add any slave servers, one per line. When you are
done with the list, type a <control D>.
master server   :  ellington
next host to add:  coltrane
next host to add:  ^D
The current list of NIS servers looks like this:
ellington
coltrane
Is this correct?  [y/n: y] y

[..output from map generation..]

NIS Map update completed.
ellington has been setup as an YP master server without any errors.

ypinit ¤Ï /var/yp/Makefile ¤ò /var/yp/Makefile.dist ¤«¤éºîÀ®¤·¤Þ¤¹¡£ ºîÀ®¤µ¤ì¤¿»þÅÀ¤Ç¤Ï¡¢¤½¤Î¥Õ¥¡¥¤¥ë¤Ï¤¢¤Ê¤¿¤¬ FreeBSD ¥Þ¥·¥ó¤À¤±¤«¤é¤Ê¤ë¥µ¡¼¥Ð¤¬ 1 Âæ¤À¤±¤Î NIS ´Ä¶­¤ò°·¤Ã¤Æ¤¤¤ë¤È²¾Äꤷ¤Æ¤¤¤Þ¤¹¡£ test-domain ¤Ï¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤ò°ì¤Ä»ý¤Ã¤Æ¤¤¤Þ¤¹¤Î¤Ç /var/yp/Makefile ¤òÊÔ½¸¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£

ellington# vi /var/yp/Makefile

°Ê²¼¤Î¹Ô¤ò (¤â¤·´û¤Ë¥³¥á¥ó¥È¥¢¥¦¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤Ê¤é¤Ð) ¥³¥á¥ó¥È¥¢¥¦¥È¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£

NOPUSH = "True"

22.9.4.2.3. NIS ¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤ÎÀßÄê

NIS ¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤ÎÀßÄê¤Ï¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤ÎÀßÄê°Ê¾å¤Ë´Êñ¤Ç¤¹¡£ ¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤Ë¥í¥°¥ª¥ó¤· /etc/rc.conf ¥Õ¥¡¥¤¥ë¤òÁ°²ó¤ÈƱÍͤËÊÔ½¸¤·¤Þ¤¹¡£Í£°ì¤Î°ã¤¦¤È¤³¤í¤Ï ypinit ¤Î¼Â¹Ô¤Ë -s ¥ª¥×¥·¥ç¥ó¤ò»È¤ï¤Ê¤±¤ì¤Ð¤¤¤±¤Ê¤¤¤³¤È¤Ç¤¹¡£ -s ¥ª¥×¥·¥ç¥ó¤Ï NIS ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤Î̾Á°¤òÍ׵ᤷ¡¢ ¥³¥Þ¥ó¥É¥é¥¤¥ó¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£

coltrane# ypinit -s ellington test-domain

Server Type: SLAVE Domain: test-domain Master: ellington

Creating an YP server will require that you answer a few questions.
Questions will all be asked at the beginning of the procedure.

Do you want this procedure to quit on non-fatal errors? [y/n: n]  n

Ok, please remember to go back and redo manually whatever fails.
If you don't, something might not work.
There will be no further questions. The remainder of the procedure
should take a few minutes, to copy the databases from ellington.
Transferring netgroup...
ypxfr: Exiting: Map successfully transferred
Transferring netgroup.byuser...
ypxfr: Exiting: Map successfully transferred
Transferring netgroup.byhost...
ypxfr: Exiting: Map successfully transferred
Transferring master.passwd.byuid...
ypxfr: Exiting: Map successfully transferred
Transferring passwd.byuid...
ypxfr: Exiting: Map successfully transferred
Transferring passwd.byname...
ypxfr: Exiting: Map successfully transferred
Transferring group.bygid...
ypxfr: Exiting: Map successfully transferred
Transferring group.byname...
ypxfr: Exiting: Map successfully transferred
Transferring services.byname...
ypxfr: Exiting: Map successfully transferred
Transferring rpc.bynumber...
ypxfr: Exiting: Map successfully transferred
Transferring rpc.byname...
ypxfr: Exiting: Map successfully transferred
Transferring protocols.byname...
ypxfr: Exiting: Map successfully transferred
Transferring master.passwd.byname...
ypxfr: Exiting: Map successfully transferred
Transferring networks.byname...
ypxfr: Exiting: Map successfully transferred
Transferring networks.byaddr...
ypxfr: Exiting: Map successfully transferred
Transferring netid.byname...
ypxfr: Exiting: Map successfully transferred
Transferring hosts.byaddr...
ypxfr: Exiting: Map successfully transferred
Transferring protocols.bynumber...
ypxfr: Exiting: Map successfully transferred
Transferring ypservers...
ypxfr: Exiting: Map successfully transferred
Transferring hosts.byname...
ypxfr: Exiting: Map successfully transferred

coltrane has been setup as an YP slave server without any errors.
Don't forget to update map ypservers on ellington.

¤³¤ÎÎã¤Î¾ì¹ç /var/yp/test-domain ¤È¤¤¤¦¥Ç¥£¥ì¥¯¥È¥ê¤¬É¬Íפˤʤê¤Þ¤¹¡£ NIS ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤Î¥Þ¥Ã¥×¥Õ¥¡¥¤¥ë¤Î¥³¥Ô¡¼¤Ï¡¢ ¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤¤¤Æ¤¯¤À¤µ¤¤¡£ ¤³¤ì¤é¤ò³Î¼Â¤ËºÇ¿·¤Î¤â¤Î¤Ë°Ý»ý¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ ¼¡¤Î¥¨¥ó¥È¥ê¤ò¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤Î /etc/crontab ¤ËÄɲ乤뤳¤È¤Ç¡¢ºÇ¿·¤Î¤â¤Î¤ËÊݤĤ³¤È¤¬¤Ç¤­¤Þ¤¹¡£

20      *       *       *       *       root   /usr/libexec/ypxfr passwd.byname
21      *       *       *       *       root   /usr/libexec/ypxfr passwd.byuid

¤³¤ÎÆó¹Ô¤Ï¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤Ë¤¢¤ë¥Þ¥Ã¥×¥Õ¥¡¥¤¥ë¤ò¡¢ ¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤Î¥Þ¥Ã¥×¥Õ¥¡¥¤¥ë¤ÈƱ´ü¤µ¤»¤ë¤â¤Î¤Ç¤¹¡£ ¤³¤Î¥¨¥ó¥È¥ê¤Ïɬ¿Ü¤È¤¤¤¦¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¤¬¡¢¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤Ï NIS ¥Þ¥Ã¥×¤ËÂФ¹¤ëÊѹ¹¤ò¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤ËÅÁ¤¨¤è¤¦¤È¤·¤Þ¤¹¤·¡¢ ¥µ¡¼¥Ð¤¬´ÉÍý¤¹¤ë¥·¥¹¥Æ¥à¤Ë¤È¤Ã¤Æ¥Ñ¥¹¥ï¡¼¥É¾ðÊó¤Ï¤È¤Æ¤â½ÅÍפʤΤǡ¢ ¶¯À©Åª¤Ë¹¹¿·¤·¤Æ¤·¤Þ¤¦¤³¤È¤Ï¤è¤¤¹Í¤¨¤Ç¤¹¡£Æäˡ¢ ¥Þ¥Ã¥×¥Õ¥¡¥¤¥ë¤Î¹¹¿·¤¬¤­¤Á¤ó¤È¹Ô¤Ê¤ï¤ì¤ë¤«¤É¤¦¤«¤ï¤«¤é¤Ê¤¤¤¯¤é¤¤º®»¨¤¹¤ë¥Í¥Ã¥È¥ï¡¼¥¯¤Ç¤Ï¡¢ ½ÅÍפˤʤê¤Þ¤¹¡£

¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¾å¤Ç¤â /etc/netstart ¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤·¤Æ¡¢NIS ¥µ¡¼¥Ð¤òºÆµ¯Æ°¤·¤Æ¤¯¤À¤µ¤¤¡£

22.9.4.3. NIS ¥¯¥é¥¤¥¢¥ó¥È

NIS ¥¯¥é¥¤¥¢¥ó¥È¤Ï ypbind ¥Ç¡¼¥â¥ó¤ò»È¤Ã¤Æ¡¢ÆÃÄê¤Î NIS ¥µ¡¼¥Ð¤È¤Î´Ö¤Ë·ë¹ç (binding) ¤È¸Æ¤Ð¤ì¤ë´Ø·¸¤òÀ®Î©¤µ¤»¤Þ¤¹¡£ ypbind ¤Ï¥·¥¹¥Æ¥à¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥É¥á¥¤¥ó (domainname ¥³¥Þ¥ó¥É¤ÇÀßÄꤵ¤ì¤Þ¤¹) ¤ò³Îǧ¤·¡¢RPC Í×µá¤ò¥í¡¼¥«¥ë¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¥Ö¥í¡¼¥É¥­¥ã¥¹¥È¤·¤Þ¤¹¡£ ¤³¤Î RPC Í×µá¤Ë¤è¤ê ypbind ¤¬·ë¹ç¤òÀ®Î©¤µ¤»¤è¤¦¤È¤·¤Æ¤¤¤ë¥É¥á¥¤¥ó̾¤¬»ØÄꤵ¤ì¤Þ¤¹¡£ Í׵ᤵ¤ì¤Æ¤¤¤ë¥É¥á¥¤¥ó̾¤ËÂФ·¤Æ¥µ¡¼¥Ó¥¹¤¹¤ë¤è¤¦ÀßÄꤵ¤ì¤¿¥µ¡¼¥Ð¤¬ ¥Ö¥í¡¼¥É¥­¥ã¥¹¥È¤ò¼õ¿®¤¹¤ë¤È¡¢ ¥µ¡¼¥Ð¤Ï ypbind ¤Ë±þÅú¤·ypbind ¤Ï±þÅú¤Î¤¢¤Ã¤¿¥µ¡¼¥Ð¤Î¥¢¥É¥ì¥¹¤òµ­Ï¿¤·¤Þ¤¹¡£Ê£¿ô¤Î¥µ¡¼¥Ð (¤¿¤È¤¨¤Ð°ì¤Ä¤Î¥Þ¥¹¥¿¡¼¥µ¡¼¥Ð¤È¡¢Ê£¿ô¤Î¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð) ¤¬ÍøÍѲÄǽ¤Ê¾ì¹ç¡¢ypbind ¤Ï¡¢ ºÇ½é¤Ë±þÅú¤·¤¿¥µ¡¼¥Ð¤Î¥¢¥É¥ì¥¹¤ò»ÈÍѤ·¤Þ¤¹¡£ ¤³¤ì°Ê¹ß¡¢¥¯¥é¥¤¥¢¥ó¥È¤Î¥·¥¹¥Æ¥à¤Ï¡¢ ¤¹¤Ù¤Æ¤Î NIS ¤ÎÍ×µá¤ò¤½¤Î¥µ¡¼¥Ð¤Ë¸þ¤±¤ÆÁ÷¿®¤·¤Þ¤¹¡£ ypbind ¤Ï¡¢ ¥µ¡¼¥Ð¤¬½çÄ´¤ËÆ°ºî¤·¤Æ¤¤¤ë¤³¤È¤ò³Îǧ¤¹¤ë¤¿¤á¡¢ »þ¡¹ “ping” ¤ò¥µ¡¼¥Ð¤ËÁ÷¤ê¤Þ¤¹¡£ È¿±þ¤¬Ìá¤Ã¤Æ¤¯¤ë¤Ù¤­»þ´ÖÆâ¤Ë ping ¤ËÂФ¹¤ë±þÅú¤¬Íè¤Ê¤±¤ì¤Ð¡¢ ypbind ¤Ï¡¢¤½¤Î¥É¥á¥¤¥ó¤ò·ë¹çÉÔǽ (unbound) ¤È¤·¤Æµ­Ï¿¤·¡¢Ê̤Υµ¡¼¥Ð¤ò¸«¤Ä¤±¤ë¤Ù¤¯¡¢ ºÆ¤Ó¥Ö¥í¡¼¥É¥­¥ã¥¹¥È¥Ñ¥±¥Ã¥È¤ÎÁ÷¿®¤ò¹Ô¤¤¤Þ¤¹¡£

22.9.4.3.1. NIS ¥¯¥é¥¤¥¢¥ó¥È¤ÎÀßÄê

FreeBSD ¥Þ¥·¥ó¤ò NIS ¥¯¥é¥¤¥¢¥ó¥È¤Ë¤¹¤ëÀßÄê¤ÏÈó¾ï¤Ëñ½ã¤Ç¤¹¡£

  1. ¥Í¥Ã¥È¥ï¡¼¥¯¤Îµ¯Æ°»þ¤Ë NIS ¥É¥á¥¤¥ó̾¤òÀßÄꤷ¤Æ ypbind ¤òµ¯Æ°¤µ¤»¤ë¤¿¤á¤Ë /etc/rc.conf ¥Õ¥¡¥¤¥ë¤òÊÔ½¸¤·¤Æ°Ê²¼¤Î¹Ô¤òÄɲä·¤Þ¤¹¡£

    nisdomainname="test-domain"
    nis_client_enable="YES"
    
  2. NIS ¥µ¡¼¥Ð¤«¤é¡¢ ÍøÍѲÄǽ¤Ê¥Ñ¥¹¥ï¡¼¥É¥¨¥ó¥È¥ê¤ò¤¹¤Ù¤Æ¼è¤ê¹þ¤à¤¿¤á¡¢ /etc/master.passwd ¤«¤é¤¹¤Ù¤Æ¤Î¥æ¡¼¥¶¥¢¥«¥¦¥ó¥È¤ò¼è¤ê½ü¤¤¤Æ¡¢ vipw ¥³¥Þ¥ó¥É¤Ç°Ê²¼¤Î¹Ô¤ò /etc/master.passwd ¤ÎºÇ¸å¤ËÄɲä·¤Þ¤¹¡£

    +:::::::::
    

    注意: ¤³¤Î¹Ô¤Ë¤è¤Ã¤Æ NIS ¥µ¡¼¥Ð¤Î¥Ñ¥¹¥ï¡¼¥É¥Þ¥Ã¥×¤Ë¥¢¥«¥¦¥ó¥È¤¬¤¢¤ë¿ÍÁ´°÷¤Ë¥¢¥«¥¦¥ó¥È¤¬Í¿¤¨¤é¤ì¤Þ¤¹¡£ ¤³¤Î¹Ô¤òÊѹ¹¤¹¤ë¤È¡¢ ¤µ¤Þ¤¶¤Þ¤Ê NIS ¥¯¥é¥¤¥¢¥ó¥È¤ÎÀßÄê¤ò¹Ô¤Ê¤¦¤³¤È¤¬²Äǽ¤Ç¤¹¡£ ¾ÜºÙ¤Ï ¥Í¥Ã¥È¥°¥ë¡¼¥× ¤ò¡¢¤µ¤é¤Ë¾Ü¤·¤¤¾ðÊó¤Ë¤Ä¤¤¤Æ¤Ï¡¢O'Reilly ¤Î Managing NFS and NIS ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£

    注意: /etc/master.passwd Æâ¤Ë¾¯¤Ê¤¯¤È¤â°ì¤Ä¤Î¥í¡¼¥«¥ë¥¢¥«¥¦¥ó¥È (¤Ä¤Þ¤ê NIS ·Ðͳ¤Ç¥¤¥ó¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¥¢¥«¥¦¥ó¥È) ¤òÃÖ¤¯¤Ù¤­¤Ç¤¹¡£ ¤Þ¤¿¡¢¤³¤Î¥¢¥«¥¦¥ó¥È¤Ï wheel ¥°¥ë¡¼¥×¤Î¥á¥ó¥Ð¡¼¤Ç¤¢¤ë¤Ù¤­¤Ç¤¹¡£ NIS ¤¬¤É¤³¤«Ä´»Ò°­¤¤¤È¤­¤Ë¤Ï¡¢ ¥ê¥â¡¼¥È¤«¤é¤³¤Î¥¢¥«¥¦¥ó¥È¤Ç¥í¥°¥¤¥ó¤·¡¢ root ¤Ë¤Ê¤Ã¤Æ½¤Éü¤¹¤ë¤Î¤ËÍøÍѤǤ­¤Þ¤¹¡£

  3. NIS ¥µ¡¼¥Ð¤Ë¤¢¤ë¤¹¤Ù¤Æ¤Î¥°¥ë¡¼¥×¥¨¥ó¥È¥ê¤ò¼è¤ê¹þ¤à¤¿¤á¡¢ °Ê²¼¤Î¹Ô¤ò /etc/group ¤ËÄɲä·¤Þ¤¹¡£

    +:*::
    

¾åµ­¤Î¼ê½ç¤¬¤¹¤Ù¤Æ´°Î»¤¹¤ì¤Ð¡¢ ypcat passwd ¤Ë¤è¤Ã¤Æ NIS ¥µ¡¼¥Ð¤Î passwd ¥Þ¥Ã¥×¤¬»²¾È¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¡£

22.9.5. NIS ¥»¥­¥å¥ê¥Æ¥£

°ìÈ̤˥ɥᥤ¥ó̾¤µ¤¨ÃΤäƤ¤¤ì¤Ð¡¢ ¤É¤³¤Ë¤¤¤ë¥ê¥â¡¼¥È¥æ¡¼¥¶¤Ç¤â ypserv(8) ¤Ë RPC ¤òȯ¹Ô¤·¤Æ NIS ¥Þ¥Ã¥×¤ÎÆâÍƤò°ú¤­½Ð¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¤³¤¦¤¤¤Ã¤¿ÉÔÀµ¤Ê¤ä¤ê¤È¤ê¤òËɤ°¤¿¤á¡¢ ypserv(8) ¤Ë¤Ï securenets ¤È¸Æ¤Ð¤ì¤ëµ¡Ç½¤¬¤¢¤ê¤Þ¤¹¡£¤³¤ì¤Ï¡¢ ¥¢¥¯¥»¥¹¤ò·è¤á¤é¤ì¤¿¥Û¥¹¥È¤À¤±¤ËÀ©¸Â¤¹¤ë¤Î¤Ë»È¤¨¤ëµ¡Ç½¤Ç¤¹¡£ ypserv(8) ¤Ïµ¯Æ°»þ¤Ë /var/yp/securenets ¥Õ¥¡¥¤¥ë¤«¤é securenets ¤Ë´Ø¤¹¤ë¾ðÊó¤òÆɤ߹þ¤ß¤Þ¤¹¡£

注意: ¾åµ­¤Î¥Ñ¥¹Ì¾¤Ï -p ¥ª¥×¥·¥ç¥ó¤Ç»ØÄꤵ¤ì¤¿¥Ñ¥¹Ì¾¤Ë¤è¤Ã¤ÆÊѤï¤ê¤Þ¤¹¡£¤³¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢ ¶õÇò¤Ç¶èÀÚ¤é¤ì¤¿¥Í¥Ã¥È¥ï¡¼¥¯»ØÄê¤È¥Í¥Ã¥È¥Þ¥¹¥¯¤Î¥¨¥ó¥È¥ê¤«¤é¤Ê¤Ã¤Æ¤¤¤Æ¡¢ “#” ¤Ç»Ï¤Þ¤ë¹Ô¤Ï¥³¥á¥ó¥È¤È¤ß¤Ê¤µ¤ì¤Þ¤¹¡£ ´Êñ¤Ê securenets ¥Õ¥¡¥¤¥ë¤ÎÎã¤ò°Ê²¼¤Ë¼¨¤·¤Þ¤¹¡£

# allow connections from local host -- mandatory
127.0.0.1     255.255.255.255
# allow connections from any host
# on the 192.168.128.0 network
192.168.128.0 255.255.255.0
# allow connections from any host
# between 10.0.0.0 to 10.0.15.255
10.0.0.0      255.255.240.0

ypserv(8) ¤¬¾åµ­¤Î¥ë¡¼¥ë¤Î°ì¤Ä¤È¹çÃפ¹¤ë¥¢¥É¥ì¥¹¤«¤é¤ÎÍ×µá¤ò¼õ¤±¼è¤Ã¤¿¾ì¹ç¡¢ ½èÍý¤ÏÀµ¾ï¤Ë¹Ô¤Ê¤ï¤ì¤Þ¤¹¡£ ¤â¤·¥¢¥É¥ì¥¹¤¬¥ë¡¼¥ë¤Ë¹çÃפ·¤Ê¤±¤ì¤Ð¡¢ ¤½¤ÎÍ×µá¤Ï̵»ë¤µ¤ì¤Æ·Ù¹ð¥á¥Ã¥»¡¼¥¸¤¬¥í¥°¤Ëµ­Ï¿¤µ¤ì¤Þ¤¹¡£ ¤Þ¤¿ /var/yp/securenets ¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¡¢ ypserv ¤Ï¤¹¤Ù¤Æ¤Î¥Û¥¹¥È¤«¤é¤ÎÀܳ¤ò¼õ¤±Æþ¤ì¤Þ¤¹¡£

ypserv ¤Ï Wietse Venema »á¤Ë¤è¤ë tcpwrapper ¥Ñ¥Ã¥±¡¼¥¸¤â¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£ ¤½¤Î¤¿¤á /var/yp/securenets ¤ÎÂå¤ï¤ê¤Ë tcpwrapper ¤ÎÀßÄê¥Õ¥¡¥¤¥ë¤ò»È¤Ã¤Æ¥¢¥¯¥»¥¹À©¸æ¤ò¹Ô¤Ê¤¦¤³¤È¤â²Äǽ¤Ç¤¹¡£

注意: ¤³¤ì¤é¤Î¥¢¥¯¥»¥¹À©¸æµ¡Ç½¤Ï°ìÄê¤Î¥»¥­¥å¥ê¥Æ¥£¤òÄ󶡤·¤Þ¤¹¤¬¡¢ ¤É¤Á¤é¤âÆø¢¥Ý¡¼¥È¤Î¥Æ¥¹¥È¤Î¤è¤¦¤Ê “IP spoofing” ¹¶·â¤ËÂФ·¤ÆÀȼå¤Ç¤¹¡£¤¹¤Ù¤Æ¤Î NIS ´ØÏ¢¤Î¥È¥é¥Õ¥£¥Ã¥¯¤Ï¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤Ç¥Ö¥í¥Ã¥¯¤µ¤ì¤ë¤Ù¤­¤Ç¤¹¡£

/var/yp/securenets ¤ò»È¤Ã¤Æ¤¤¤ë¥µ¡¼¥Ð¤Ï¡¢¸Å¤¤ TCP/IP ¼ÂÁõ¤ò»ý¤ÄÀµÅö¤Ê¥¯¥é¥¤¥¢¥ó¥È¤Ø¤Î¥µ¡¼¥Ó¥¹¤Ë¼ºÇÔ¤¹¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£ ¤³¤ì¤é¤Î¼ÂÁõ¤ÎÃæ¤Ë¤Ï¥Ö¥í¡¼¥É¥­¥ã¥¹¥È¤Î¥Û¥¹¥È¥Ó¥Ã¥È¤ò¤¹¤Ù¤Æ 0 ¤Ç¥»¥Ã¥È¤·¤Æ¤·¤Þ¤Ã¤¿¤ê¡¢ ¥Ö¥í¡¼¥É¥­¥ã¥¹¥È¥¢¥É¥ì¥¹¤Î·×»»¤Ç¥µ¥Ö¥Í¥Ã¥È¥Þ¥¹¥¯¤ò¸«Íî¤È¤·¤Æ¤·¤Þ¤Ã¤¿¤ê¤¹¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡£ ¤³¤ì¤é¤ÎÌäÂê¤Ë¤Ï¥¯¥é¥¤¥¢¥ó¥È¤ÎÀßÄê¤òÀµ¤·¤¯¹Ô¤Ê¤¨¤Ð²ò·è¤Ç¤­¤ë¤â¤Î¤â¤¢¤ê¤Þ¤¹¤¬¡¢ ÌäÂê¤È¤Ê¤Ã¤Æ¤¤¤ë¥¯¥é¥¤¥¢¥ó¥È¥·¥¹¥Æ¥à¤ò°úÂव¤»¤ë¤«¡¢ /var/yp/securenets ¤ò»È¤ï¤Ê¤¤¤è¤¦¤Ë¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤â¤Î¤â¤¢¤ê¤Þ¤¹¡£

¤³¤Î¤è¤¦¤Ê¸ÅÉ÷¤Ê TCP/IP ¤Î¼ÂÁõ¤ò»ý¤Ä¥µ¡¼¥Ð¤Ç /var/yp/securenets ¤ò»È¤¦¤³¤È¤Ï¼Â¤Ë°­¤¤¹Í¤¨¤Ç¤¢¤ê¡¢ ¤¢¤Ê¤¿¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÂçÉôʬ¤Ë¤ª¤¤¤Æ NIS ¤Îµ¡Ç½ÁÓ¼º¤ò¾·¤­¤Þ¤¹¡£

tcpwrapper ¥Ñ¥Ã¥±¡¼¥¸¤ò»È¤¦¤È¤¢¤Ê¤¿¤Î NIS ¥µ¡¼¥Ð¤Î¥ì¥¤¥Æ¥ó¥· (ÃÙ±ä) ¤¬Áý²Ã¤·¤Þ¤¹¡£Æä˺®»¨¤·¤¿¥Í¥Ã¥È¥ï¡¼¥¯¤äÃÙ¤¤ NIS ¥µ¡¼¥Ð¤Ç¤Ï¡¢ÃÙ±ä¤ÎÁý²Ã¤Ë¤è¤Ã¤Æ¡¢ ¥¯¥é¥¤¥¢¥ó¥È¥×¥í¥°¥é¥à¤Î¥¿¥¤¥à¥¢¥¦¥È¤¬µ¯¤³¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ °ì¤Ä°Ê¾å¤Î¥¯¥é¥¤¥¢¥ó¥È¥·¥¹¥Æ¥à¤¬¤³¤ì¤é¤ÎÃû¸õ¤ò¼¨¤·¤¿¤Ê¤é¡¢ ¤¢¤Ê¤¿¤ÏÌäÂê¤È¤Ê¤Ã¤Æ¤¤¤ë¥¯¥é¥¤¥¢¥ó¥È¥·¥¹¥Æ¥à¤ò NIS ¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤Ë¤·¤Æ¼«Ê¬¼«¿È¤Ë·ë¤ÓÉÕ¤¯¤è¤¦¤Ë¶¯À©¤¹¤Ù¤­¤Ç¤¹¡£

22.9.6. ²¿¿Í¤«¤Î¥æ¡¼¥¶¤Î¥í¥°¥ª¥ó¤ò¼×ÃǤ¹¤ë

¤ï¤¿¤·¤¿¤Á¤Î¸¦µæ¼¼¤Ë¤Ï basie ¤È¤¤¤¦¡¢ ¶µ°÷ÀìÍѤΥޥ·¥ó¤¬¤¢¤ê¤Þ¤¹¡£¤ï¤¿¤·¤¿¤Á¤Ï¤³¤Î¥Þ¥·¥ó¤ò NIS ¥É¥á¥¤¥ó¤Î³°¤Ë½Ð¤·¤¿¤¯¤Ê¤¤¤Î¤Ç¤¹¤¬¡¢ ¥Þ¥¹¥¿ NIS ¥µ¡¼¥Ð¤Î passwd ¥Õ¥¡¥¤¥ë¤Ë¤Ï¶µ°÷¤È³ØÀ¸¤ÎξÊý¤¬ºÜ¤Ã¤Æ¤¤¤Þ¤¹¡£ ¤É¤¦¤·¤¿¤é¤¤¤¤¤Ç¤·¤ç¤¦?

Åö³º¿Íʪ¤¬ NIS ¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËºÜ¤Ã¤Æ¤¤¤Æ¤â¡¢ ¤½¤Î¥æ¡¼¥¶¤¬¥Þ¥·¥ó¤Ë¥í¥°¥ª¥ó¤Ç¤­¤Ê¤¤¤è¤¦¤Ë¤¹¤ëÊýË¡¤¬¤¢¤ê¤Þ¤¹¡£ ¤½¤¦¤¹¤ë¤Ë¤Ï -username ¤ò¥¯¥é¥¤¥¢¥ó¥È¥Þ¥·¥ó¤Î /etc/master.passwd ¥Õ¥¡¥¤¥ë¤ÎËöÈø¤ËÉÕ¤±Â­¤·¤Þ¤¹¡£ username ¤Ï¤¢¤Ê¤¿¤¬¥í¥°¥¤¥ó¤µ¤»¤¿¤¯¤Ê¤¤¤È»×¤Ã¤Æ¤¤¤ë¥æ¡¼¥¶¤Î¥æ¡¼¥¶Ì¾¤Ç¤¹¡£ ¤³¤ì¤Ï vipw ¤Ç¹Ô¤¦¤Ù¤­¤Ç¤¹¡£ vipw ¤Ï /etc/master.passwd ¤Ø¤ÎÊѹ¹¤ò¥Á¥§¥Ã¥¯¤·¡¢ÊÔ½¸½ªÎ»¸å¥Ñ¥¹¥ï¡¼¥É¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºÆ¹½ÃÛ¤·¤Þ¤¹¡£ ¤¿¤È¤¨¤Ð¡¢¥æ¡¼¥¶ bill ¤¬ basie ¤Ë¥í¥°¥ª¥ó¤¹¤ë¤Î¤òËɤ®¤¿¤¤¤Ê¤é¡¢°Ê²¼¤Î¤è¤¦¤Ë¤·¤Þ¤¹¡£

basie# vipw
[add -bill to the end, exit]
vipw: rebuilding the database...
vipw: done

basie# cat /etc/master.passwd

root:[password]:0:0::0:0:The super-user:/root:/bin/csh
toor:[password]:0:0::0:0:The other super-user:/root:/bin/sh
daemon:*:1:1::0:0:Owner of many system processes:/root:/sbin/nologin
operator:*:2:5::0:0:System &:/:/sbin/nologin
bin:*:3:7::0:0:Binaries Commands and Source,,,:/:/sbin/nologin
tty:*:4:65533::0:0:Tty Sandbox:/:/sbin/nologin
kmem:*:5:65533::0:0:KMem Sandbox:/:/sbin/nologin
games:*:7:13::0:0:Games pseudo-user:/usr/games:/sbin/nologin
news:*:8:8::0:0:News Subsystem:/:/sbin/nologin
man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/sbin/nologin
bind:*:53:53::0:0:Bind Sandbox:/:/sbin/nologin
uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
xten:*:67:67::0:0:X-10 daemon:/usr/local/xten:/sbin/nologin
pop:*:68:6::0:0:Post Office Owner:/nonexistent:/sbin/nologin
nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/sbin/nologin
+:::::::::
-bill

basie#

22.9.7. ¥Í¥Ã¥È¥°¥ë¡¼¥×¤ÎÍøÍÑ

´ó¹Æ: Udo Erdelhoff.

Á°Àá¤Þ¤Ç¤Ë¸«¤Æ¤­¤¿¼êË¡¤Ï¡¢ ¶Ë¤á¤Æ¾¯¤Ê¤¤¥æ¡¼¥¶/¥Þ¥·¥ó¸þ¤±¤Ë¸ÄÊ̤Υ롼¥ë¤òɬÍפȤ·¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¤¦¤Þ¤¯µ¡Ç½¤·¤Þ¤¹¡£ ¤·¤«¤·Â礭¤Ê¥Í¥Ã¥È¥ï¡¼¥¯¤Ç¤Ï¡¢ ¥æ¡¼¥¶¤Ë¿¨¤é¤ì¤¿¤¯¤Ê¤¤¥Þ¥·¥ó¤Ø¥í¥°¥ª¥ó¤òËɤ°¤Î¤ò ˺¤ì¤ë¤Ç¤·¤ç¤¦ ¤·¡¢ ¤½¤¦¤Ç¤Ê¤¯¤È¤â³Æ¥Þ¥·¥ó¤ò¸ÄÊ̤ËÀßÄꤷ¤Æ²ó¤é¤Ê¤±¤ì¤Ð¤Ê¤é¤º¡¢ ½¸Ãæ´ÉÍý¤È¤¤¤¦ NIS ¤Î²¸·Ã¤ò¼º¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£

NIS ¤Î³«È¯¼Ô¤Ï¤³¤ÎÌäÂê¤ò ¥Í¥Ã¥È¥°¥ë¡¼¥× ¤È¸Æ¤Ð¤ì¤ëÊýË¡¤Ç²ò·è¤·¤Þ¤·¤¿¡£ ¤½¤ÎÌÜŪ¤È°ÕÌ£¹ç¤¤¤Ï UNIX ¤Î¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ç»È¤ï¤ì¤Æ¤¤¤ë°ìÈÌŪ¤Ê¥°¥ë¡¼¥×¤ÈÈæ³Ó¤Ç¤­¤Þ¤¹¡£ ¼ç¤¿¤ëÁê°ã¤Ï¿ôÃÍ ID ¤¬Â¸ºß¤·¤Ê¤¤¤³¤È¤È¡¢ ¥æ¡¼¥¶¥¢¥«¥¦¥ó¥È¤ÈÊ̤Υͥåȥ°¥ë¡¼¥×¤ò´Þ¤á¤¿¥Í¥Ã¥È¥°¥ë¡¼¥×¤òÄêµÁ¤Ç¤­¤ë¤³¤È¤Ç¤¹¡£

¥Í¥Ã¥È¥°¥ë¡¼¥×¤ÏÉ´¿Í/Âæ°Ê¾å¤Î¥æ¡¼¥¶¤È¥Þ¥·¥ó¤ò´Þ¤à¡¢ Â礭¤¯Ê£»¨¤Ê¥Í¥Ã¥È¥ï¡¼¥¯¤ò°·¤¦¤¿¤á¤Ë³«È¯¤µ¤ì¤Þ¤·¤¿¡£ ¤¢¤Ê¤¿¤¬¤³¤Î¤è¤¦¤Ê¾õ¶·¤ò°·¤ï¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤Ê¤éÊØÍø¤Ê¤â¤Î¤Ê¤Î¤Ç¤¹¤¬¡¢ °ìÊý¤Ç¡¢¤³¤ÎÊ£»¨¤µ¤Ïñ½ã¤ÊÎã¤Ç¥Í¥Ã¥È¥°¥ë¡¼¥×¤ÎÀâÌÀ¤ò¤¹¤ë¤³¤È¤ò¤Û¤È¤ó¤ÉÉÔ²Äǽ¤Ë¤·¤Æ¤¤¤Þ¤¹¡£ ¤³¤ÎÀá¤Î»Ä¤ê¤Ç»È¤ï¤ì¤Æ¤¤¤ëÎã¤Ï¡¢¤³¤ÎÌäÂê¤ò¼Â±é¤·¤Æ¤¤¤Þ¤¹¡£

¤¢¤Ê¤¿¤Î¹Ô¤Ê¤Ã¤¿¡¢ ¸¦µæ¼¼¤Ø¤Î NIS ¤ÎƳÆþ¤ÎÀ®¸ù¤¬¾å»Ê¤ÎÌܤ˻ߤ俤Ȥ·¤Þ¤·¤ç¤¦¡£ ¤¢¤Ê¤¿¤Î¼¡¤Î»Å»ö¤Ï¡¢¤¢¤Ê¤¿¤Î NIS ¥É¥á¥¤¥ó¤ò¥­¥ã¥ó¥Ñ¥¹¤Î¾¤Î¤¤¤¯¤Ä¤â¤Î¥Þ¥·¥ó¤òʤ¤¦¤â¤Î¤Ø³ÈÄ¥¤¹¤ë¤³¤È¤Ç¤¹¡£ Æó¤Ä¤Îɽ¤Ï¿·¤·¤¤¥æ¡¼¥¶¤È¿·¤·¤¤¥Þ¥·¥ó¤Î̾Á°¤È¤½¤ÎÀâÌÀ¤ò´Þ¤ó¤Ç¤¤¤Þ¤¹¡£

¥æ¡¼¥¶¤Î̾Á° ÀâÌÀ
alpha, beta IT ³Ø²Ê¤ÎÄ̾ï¤Î¿¦°÷
charlie, delta IT ³Ø²Ê¤Î¿·¤·¤¤¸«½¬¤¤
echo, foxtrott, golf, ... °ìÈ̤ο¦°÷
able, baker, ... ¤Þ¤À¥¤¥ó¥¿¡¼¥ó
¥Þ¥·¥ó¤Î̾Á° ÀâÌÀ
war, death, famine, pollution ºÇ¤â½ÅÍפʥµ¡¼¥Ð¡£IT ¿¦°÷¤À¤±¤¬¥í¥°¥ª¥ó¤òµö¤µ¤ì¤Þ¤¹¡£
pride, greed, envy, wrath, lust, sloth ¤¢¤Þ¤ê½ÅÍפǤʤ¤¥µ¡¼¥Ð¡£ IT ³Ø²Ê¤ÎÁ´°÷¤¬¥í¥°¥ª¥ó¤òµö¤µ¤ì¤Þ¤¹¡£
one, two, three, four, ... Ä̾ï¤Î¥ï¡¼¥¯¥¹¥Æ¡¼¥·¥ç¥ó¡£ ËÜÅö¤Î ¿¦°÷¤À¤±¤¬¥í¥°¥ª¥ó¤òµö¤µ¤ì¤Þ¤¹¡£
trashcan ½ÅÍפʥǡ¼¥¿¤ÎÆþ¤Ã¤Æ¤¤¤Ê¤¤¤Ò¤É¤¯¸Å¤¤¥Þ¥·¥ó¡£ ¥¤¥ó¥¿¡¼¥ó¤Ç¤â¤³¤Î¥Þ¥·¥ó¤Î»ÈÍѤòµö¤µ¤ì¤Þ¤¹¡£

¤â¤·¤¢¤Ê¤¿¤¬¤³¤Î¼ê¤ÎÀ©¸Â¤ò³Æ¥æ¡¼¥¶¤ò¸ÄÊ̤˥֥í¥Ã¥¯¤¹¤ë·Á¤Ç¼ÂÁõ¤¹¤ë¤Ê¤é¡¢ ¤¢¤Ê¤¿¤Ï¤½¤Î¥·¥¹¥Æ¥à¤Ë¥í¥°¥ª¥ó¤¹¤ë¤³¤È¤¬µö¤µ¤ì¤Æ¤¤¤Ê¤¤³Æ¥æ¡¼¥¶¤Ë¤Ä¤¤¤Æ -user ¤È¤¤¤¦ 1 ¹Ô¤ò¡¢³Æ¥·¥¹¥Æ¥à¤Î passwd ¤ËÄɲ䷤ʤ±¤ì¤Ð¤Ê¤é¤Ê¤¯¤Ê¤ë¤Ç¤·¤ç¤¦¡£ ¤â¤·¤¢¤Ê¤¿¤¬ 1 ¥¨¥ó¥È¥ê¤Ç¤â˺¤ì¤ì¤Ð¥È¥é¥Ö¥ë¤Ë´¬¤­¹þ¤Þ¤ì¤Æ¤·¤Þ¤¤¤Þ¤¹¡£ ºÇ½é¤Î¥»¥Ã¥È¥¢¥Ã¥×¤Î»þ¤Ë¤³¤ì¤òÀµ¤·¤¯¹Ô¤¨¤ë¤Î¤Ï¤¢¤ê¤¨¤ë¤³¤È¤«¤âÃΤì¤Þ¤»¤ó¤¬¡¢ ¿ë¤Ë¤ÏÏ¢Æü¤Î¶È̳¤Î´Ö¤ËÎã¤Î¹Ô¤òÄɲä·Ëº¤ì¤Æ¤·¤Þ¤¦¤Ç¤·¤ç¤¦¡£ ·ë¶É¥Þ¡¼¥Õ¥£¡¼¤Ï³Ú´Ñ¼çµÁ¼Ô¤À¤Ã¤¿¤Î¤Ç¤¹¡£

¤³¤Î¾õ¶·¤ò¥Í¥Ã¥È¥°¥ë¡¼¥×¤Ç°·¤¦¤È¤¤¤¯¤Ä¤«¤ÎÍ­Íø¤ÊÅÀ¤¬¤¢¤ê¤Þ¤¹¡£ ³Æ¥æ¡¼¥¶¤òÊ̸Ĥ˰·¤¦É¬ÍפϤʤ¯¡¢ ¥æ¡¼¥¶¤ò°ì¤Ä°Ê¾å¤Î¥Í¥Ã¥È¥°¥ë¡¼¥×¤Ë³ä¤êÅö¤Æ¡¢ ¥Í¥Ã¥È¥°¥ë¡¼¥×¤ÎÁ´¥á¥ó¥Ð¤Î¥í¥°¥¤¥ó¤òµö²Ä¤·¤¿¤ê¶Ø»ß¤·¤¿¤ê¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¿·¤·¤¤¥Þ¥·¥ó¤òÄɲ乤ë¤È¤­¤Ï¥Í¥Ã¥È¥°¥ë¡¼¥×¤Ø¥í¥°¥¤¥ó¤ÎÀ©¸Â¤òÄêµÁ¤¹¤ë¤À¤±¡¢ ¿·¤·¤¤¥æ¡¼¥¶¤òÄɲ乤ë¤È¤­¤Ï¤½¤Î¥æ¡¼¥¶¤ò°ì¤Ä°Ê¾å¤Î¥Í¥Ã¥È¥°¥ë¡¼¥×¤ØÄɲ乤ë¤À¤±¤Ç¡¢ ¤½¤ì¤¾¤ì¹Ô¤Ê¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¤³¤ì¤é¤ÎÊѹ¹¤Ï¸ß¤¤¤ËÆÈΩ¤Ê¤Î¤Ç¡¢ “¥æ¡¼¥¶¤È¥Þ¥·¥ó¤ÎÁȹç¤ï¤»¤ò¤É¤¦¤¹¤ë¤«” ¤Ï¸ºß¤·¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£ ¤¢¤Ê¤¿¤Î NIS ¤Î¥»¥Ã¥È¥¢¥Ã¥×¤¬Ãí°Õ¿¼¤¯·×²è¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢ ¥Þ¥·¥ó¤Ø¤Î¥¢¥¯¥»¥¹¤òǧ¤á¤ë¤Ë¤âµñÈݤ¹¤ë¤Ë¤âÃæ¿´¤ÎÀßÄê¤ò¤¿¤Ã¤¿°ì¥«½êÊѹ¹¤¹¤ë¤À¤±¤Ç¤¹¡£

ºÇ½é¤Î¥¹¥Æ¥Ã¥×¤Ï NIS ¥Þ¥Ã¥×¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î½é´ü²½¤Ç¤¹¡£ FreeBSD ¤Î ypinit(8) ¤Ï¤³¤Î¥Þ¥Ã¥×¤ò¥Ç¥Õ¥©¥ë¥È¤Çºî¤ê¤Þ¤»¤ó¤¬¡¢ ¤½¤Î NIS ¤Î¼ÂÁõ¤Ï¤½¤ì¤¬ºî¤é¤ì¤µ¤¨¤¹¤ì¤Ð¤½¤ì¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤â¤Î¤Ç¤¹¡£ ¶õ¤Î¥Þ¥Ã¥×¤òºî¤ë¤Ë¤Ï¡¢Ã±¤Ë

ellington# vi /var/yp/netgroup

¤È¥¿¥¤¥×¤·¤ÆÆâÍƤòÄɲ䷤Ƥ¤¤­¤Þ¤¹¡£ ¤ï¤¿¤·¤¿¤Á¤ÎÎã¤Ç¤Ï¡¢¤¹¤¯¤Ê¤¯¤È¤â IT ¿¦°÷¡¢IT ¸«½¬¤¤¡¢°ìÈÌ¿¦°÷¡¢ ¥¤¥ó¥¿¡¼¥ó¤Î 4 ¤Ä¤Î¥Í¥Ã¥È¥°¥ë¡¼¥×¤¬É¬ÍפǤ¹¡£

IT_EMP  (,alpha,test-domain)    (,beta,test-domain)
IT_APP  (,charlie,test-domain)  (,delta,test-domain)
USERS   (,echo,test-domain)     (,foxtrott,test-domain) \
	(,golf,test-domain)
INTERNS (,able,test-domain)     (,baker,test-domain)

IT_EMP, IT_APP Åù¤Ï¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î̾Á°¤Ç¤¹¡£ ¤½¤ì¤¾¤ì¤Î³ç¸Ì¤Ç°Ï¤Þ¤ì¤¿¥°¥ë¡¼¥×¤¬°ì¿Í°Ê¾å¤Î¥æ¡¼¥¶¥¢¥«¥¦¥ó¥È¤ò¤½¤ì¤ËÅÐÏ¿¤·¤Æ¤¤¤Þ¤¹¡£ ¥°¥ë¡¼¥×¤Î 3 ¤Ä¤Î¥Õ¥£¡¼¥ë¥É¤Ï

  1. ¤½¤Îµ­½Ò¤¬Í­¸ú¤Ê¥Û¥¹¥È (·²) ¤Î̾¾Î¡£ ¥Û¥¹¥È̾¤òÆõ­¤·¤Ê¤±¤ì¤Ð¤½¤Î¥¨¥ó¥È¥ê¤Ï¤¹¤Ù¤Æ¤Î¥Û¥¹¥È¤ÇÍ­¸ú¤Ç¤¹¡£ ¤â¤·¤¢¤Ê¤¿¤¬¥Û¥¹¥È̾¤òÆõ­¤¹¤ë¤Ê¤é¡¢ ¤¢¤Ê¤¿¤Ï°Ç¤È¶²ÉݤÈÁ´¤­º®Íð¤ÎÎΰè¤ËÆþ¤ê¹þ¤ó¤Ç¤·¤Þ¤¦¤Ç¤·¤ç¤¦¡£

  2. ¤³¤Î¥Í¥Ã¥È¥°¥ë¡¼¥×¤Ë½ê°¤¹¤ë¥¢¥«¥¦¥ó¥È¤Î̾¾Î¡£

  3. ¤½¤Î¥¢¥«¥¦¥ó¥È¤Î NIS ¥É¥á¥¤¥ó¡£ ¤â¤·¤¢¤Ê¤¿¤¬°ì¤Ä°Ê¾å¤Î NIS ¥É¥á¥¤¥ó¤ÎÉÔ¹¬¤ÊÃç´Ö¤Ê¤é¡¢ ¤¢¤Ê¤¿¤Ï¾¤Î NIS ¥É¥á¥¤¥ó¤«¤é¤¢¤Ê¤¿¤Î¥Í¥Ã¥È¥°¥ë¡¼¥×¤Ë¥¢¥«¥¦¥ó¥È¤òƳÆþ¤Ç¤­¤Þ¤¹¡£

³Æ¥Õ¥£¡¼¥ë¥É¤Ë¤Ï¡¢¥ï¥¤¥ë¥É¥«¡¼¥É¤¬»È¤¨¤Þ¤¹¡£ ¾ÜºÙ¤Ï netgroup(5) ¤ò¤´Í÷¤¯¤À¤µ¤¤¡£

注意: 8 ʸ»ú°Ê¾å¤Î¥Í¥Ã¥È¥°¥ë¡¼¥×̾¤Ï¡¢Æäˤ¢¤Ê¤¿¤Î NIS ¥É¥á¥¤¥ó¤Ç¾¤Î¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤òÁö¤é¤»¤Æ¤¤¤ë¤È¤­¤Ï»È¤¦¤Ù¤­¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ̾Á°¤Ë¤ÏÂçʸ»ú¾®Ê¸»ú¤Î¶èÊ̤¬¤¢¤ê¤Þ¤¹¡£ ¤½¤Î¤¿¤á¥Í¥Ã¥È¥°¥ë¡¼¥×̾¤ËÂçʸ»ú¤ò»È¤¦»ö¤Ï¡¢ ¥æ¡¼¥¶¤ä¥Þ¥·¥ó̾¤È¥Í¥Ã¥È¥°¥ë¡¼¥×̾¤ò¶èÊ̤¹¤ë´Êñ¤ÊÊýË¡¤Ç¤¹¡£

(FreeBSD °Ê³°¤Î) NIS ¥¯¥é¥¤¥¢¥ó¥È¤ÎÃæ¤Ë¤Ï ¿¿ô¤Î¥¨¥ó¥È¥ê¤ò°·¤¨¤Ê¤¤¤â¤Î¤â¤¢¤ê¤Þ¤¹¡£ ¤¿¤È¤¨¤Ð SunOS ¤Î¸Å¤¤ÈÇ¤Ç¤Ï 15 °Ê¾å¤Î ¥¨¥ó¥È¥ê ¤ò´Þ¤à¥Í¥Ã¥È¥°¥ë¡¼¥×¤Ï¥È¥é¥Ö¥ë¤òµ¯¤³¤·¤Þ¤¹¡£ ¤³¤ÎÀ©¸Â¤Ï 15 ¥æ¡¼¥¶°Ê²¼¤Î¥µ¥Ö¥Í¥Ã¥È¥°¥ë¡¼¥×¤ò¤¤¤¯¤Ä¤âºî¤ê¡¢ ËÜÅö¤Î¥Í¥Ã¥È¥°¥ë¡¼¥×¤Ï¤³¤Î¥µ¥Ö¥Í¥Ã¥È¥°¥ë¡¼¥×¤«¤é¤Ê¤ë¤è¤¦¤Ë¤¹¤ë¤³¤È¤Ç²óÈò¤Ç¤­¤Þ¤¹¡£

BIGGRP1  (,joe1,domain)  (,joe2,domain)  (,joe3,domain) [...]
BIGGRP2  (,joe16,domain)  (,joe17,domain) [...]
BIGGRP3  (,joe31,domain)  (,joe32,domain)
BIGGROUP  BIGGRP1 BIGGRP2 BIGGRP3

ñ°ì¤Î¥Í¥Ã¥È¥°¥ë¡¼¥×¤Ë 225 ¿Í°Ê¾å¤Î¥æ¡¼¥¶¤ò¤¤¤ì¤¿¤¤¤È¤­¤Ï¡¢ ¤³¤Î¤ä¤êÊý¤ò·«¤êÊÖ¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

¿·¤·¤¤ NIS ¥Þ¥Ã¥×¤ÎÍ­¸ú²½¤ÈÇÛÉۤϴÊñ¤Ç¤¹¡£

ellington# cd /var/yp
ellington# make

¤³¤ì¤Ç¿·¤·¤¤ 3 ¤Ä¤Î NIS ¥Þ¥Ã¥× netgroup, netgroup.byhost, netgroup.byuser ¤¬¤Ç¤­¤ë¤Ï¤º¤Ç¤¹¡£ ¿·¤·¤¤ NIS ¥Þ¥Ã¥×¤¬ÍøÍѤǤ­¤ë¤«³Î¤«¤á¤ë¤Ë¤Ï ypcat(1) ¤ò»È¤¤¤Þ¤¹¡£

ellington% ypcat -k netgroup
ellington% ypcat -k netgroup.byhost
ellington% ypcat -k netgroup.byuser

ºÇ½é¤Î¥³¥Þ¥ó¥É¤Î½ÐÎÏ¤Ï /var/yp/netgroup ¤ÎÆâÍƤ˻÷¤Æ¤¤¤ë¤Ï¤º¤Ç¤¹¡£ 2 ÈÖÌܤΥ³¥Þ¥ó¥É¤Ï¥Û¥¹¥ÈÊ̤Υͥåȥ°¥ë¡¼¥×¤òºî¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð½ÐÎϤµ¤ì¤Þ¤»¤ó¡£ 3 ÈÖÌܤΥ³¥Þ¥ó¥É¤Ï¥æ¡¼¥¶¤ËÂФ¹¤ë¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î¥ê¥¹¥È¤òÆÀ¤ë¤Î¤Ë»È¤¨¤Þ¤¹¡£

¥¯¥é¥¤¥¢¥ó¥È¦¤ÎÀßÄê¤ÏÈó¾ï¤Ë´Êñ¤Ç¤¹¡£ ¥µ¡¼¥Ð war ¤òÀßÄꤹ¤ë¤Ë¤Ï¡¢ vipw(8) ¤ò¼Â¹Ô¤·¤Æ°Ê²¼¤Î¹Ô

+:::::::::

¤ò

+@IT_EMP:::::::::

¤ËÆþ¤ìÂؤ¨¤ë¤À¤±¤Ç¤¹¡£

º£¡¢¥Í¥Ã¥È¥°¥ë¡¼¥× IT_EMP ¤ÇÄêµÁ¤µ¤ì¤¿¥æ¡¼¥¶¤Î¥Ç¡¼¥¿¤À¤±¤¬ war ¤Î¥Ñ¥¹¥ï¡¼¥É¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËÆɤ߹þ¤Þ¤ì¡¢ ¤½¤Î¥æ¡¼¥¶¤À¤±¤¬¥í¥°¥¤¥ó¤òµö¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

»ÄÇ°¤Ê¤¬¤é¤³¤ÎÀ©¸Â¤Ï¥·¥§¥ë¤Î ~ ¤Îµ¡Ç½¤ä¡¢ ¥æ¡¼¥¶Ì¾¤ä¿ôÃͤΠ¥æ¡¼¥¶ ID ¤ÎÊÑ´¹¥ë¡¼¥Á¥ó¤Ë¤â±Æ¶Á¤·¤Þ¤¹¡£ ¤Ä¤Þ¤ê¡¢ cd ~user ¤Ï¤¦¤Þ¤¯Æ°¤«¤º¡¢ ls -l ¤Ï¥æ¡¼¥¶Ì¾¤Î¤«¤ï¤ê¤Ë¿ôÃͤΠID ¤òɽ¼¨¤· find . -user joe -print ¤Ï “No such user” ¤Ç¼ºÇÔ¤·¤Þ¤¹¡£ ¤³¤ì¤òÈò¤±¤ë¤¿¤á¤Ë¤Ï¡¢¤¹¤Ù¤Æ¤Î¥æ¡¼¥¶¤Î¥¨¥ó¥È¥ê¤ò ¥µ¡¼¥Ð¤Ë¥í¥°¥¤¥ó¤¹¤ë¤³¤È¤òµö¤µ¤º¤Ë Æɤ߹þ¤Þ¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£

¤³¤ì¤Ï¤â¤¦°ì¹Ô¤ò /etc/master.passwd ¤ËÄɲ乤뤳¤È¤Ç¼Â¸½¤Ç¤­¤Þ¤¹¡£¤½¤Î¹Ô¤Ï°Ê²¼¤Î

+:::::::::/sbin/nologin ¤ò´Þ¤ó¤Ç¤ª¤ê¡¢ ¤³¤ì¤Ï “¤¹¤Ù¤Æ¤Î¥¨¥ó¥È¥ê¤òÆɤ߹þ¤à¤¬¡¢Æɤ߹þ¤Þ¤ì¤¿¥¨¥ó¥È¥ê¤Î¥·¥§¥ë¤Ï /sbin/nologin ¤ÇÃÖ¤­´¹¤¨¤é¤ì¤ë” ¤È¤¤¤¦¤³¤È¤ò°ÕÌ£¤·¤Þ¤¹¡£passwd ¥¨¥ó¥È¥ê¤Î¾¤Î¥Õ¥£¡¼¥ë¥É¤ò /etc/master.passwd ¤Î´ûÄêÃͤ«¤éÃÖ¤­´¹¤¨¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£

警告+:::::::::/sbin/nologin ¤Î¹Ô¤¬ +@IT_EMP::::::::: ¤Î¹Ô¤è¤ê¸å¤í¤Ë°ÌÃÖ¤¹¤ë¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ ¤µ¤â¤Ê¤¤¤È NIS ¤«¤éÆɤ߹þ¤Þ¤ì¤¿Á´¥æ¡¼¥¶¤¬ /sbin/nologin ¤ò¥í¥°¥¤¥ó¥·¥§¥ë¤È¤·¤Æ»ý¤Ä¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£

¤³¤ÎÊѹ¹¤Î¸å¤Ç¤Ï¡¢¿·¤·¤¤¿¦°÷¤¬ IT ³Ø²Ê¤Ë»²²Ã¤·¤Æ¤â NIS ¥Þ¥Ã¥×¤ò°ì¤Ä½ñ¤­´¹¤¨¤ë¤À¤±¤ÇºÑ¤ß¤Þ¤¹¡£ ƱÍͤˤ·¤Æ¡¢¤¢¤Þ¤ê½ÅÍפǤʤ¤¥µ¡¼¥Ð¤Î¥í¡¼¥«¥ë¤Î /etc/master.passwd ¤Î¤«¤Ä¤Æ¤Î +::::::::: ¹Ô¤ò°Ê²¼¤Î¤è¤¦¤ËÃÖ¤­´¹¤¨¤Þ¤¹¡£

+@IT_EMP:::::::::
+@IT_APP:::::::::
+:::::::::/sbin/nologin

¤³¤Î¹Ô¤Ï¡¢°ìÈ̤Υ¥¯¥¹¥Æ¡¼¥·¥ç¥ó¤Ç¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£

+@IT_EMP:::::::::
+@USERS:::::::::
+:::::::::/sbin/nologin

¤³¤ì¤Ç¤·¤Ð¤é¤¯½çÄ´¤Ë±¿ÍѤ·¤Æ¤¤¤Þ¤·¤¿¤¬¡¢ ¿ô½µ´Ö¸å¡¢¥Ý¥ê¥·¤ËÊѹ¹¤¬¤¢¤ê¤Þ¤·¤¿¡£ IT ³Ø²Ê¤Ï¥¤¥ó¥¿¡¼¥ó¤ò¸Û¤¤»Ï¤á¡¢IT ¥¤¥ó¥¿¡¼¥ó¤Ï°ìÈ̤Υ¥¯¥¹¥Æ¡¼¥·¥ç¥ó¤È;¤ê½ÅÍפǤϤʤ¤¥µ¡¼¥Ð¤ò»È¤¦¤³¤È¤¬µö¤µ¤ì¡¢ IT ¸«½¬¤¤¤Ï¥á¥¤¥ó¥µ¡¼¥Ð¤Ø¤Î¥í¥°¥¤¥ó¤¬µö¤µ¤ì¤Þ¤·¤¿¡£ ¤¢¤Ê¤¿¤Ï¿·¤¿¤Ê¥Í¥Ã¥È¥°¥ë¡¼¥× IT_INTERN ¤òÄɲ䷤ƿ·¤·¤¤ IT ¥¤¥ó¥¿¡¼¥ó¤¿¤Á¤ò¤½¤Î¥°¥ë¡¼¥×¤ËÅÐÏ¿¤·¡¢ ¤¹¤Ù¤Æ¤Î¥Þ¥·¥ó¤ÎÀßÄê¤òÊѤ¨¤Æ²ó¤ë¤³¤È¤Ë¤·¤Þ¤·¤¿¡£ ¸Å¤¤¸Á¤Ë¤³¤¦¤¢¤ê¤Þ¤¹¡£ “½¸Ãæ´ÉÍý¤Ë¤ª¤±¤ë²á¤Á¤Ï¡¢Â絬ÌϤʺ®Íð¤òƳ¤¯”¡£

¤¤¤¯¤Ä¤«¤Î¥Í¥Ã¥È¥°¥ë¡¼¥×¤«¤é¿·¤¿¤Ê¥Í¥Ã¥È¥°¥ë¡¼¥×¤òºî¤ë¤È¤¤¤¦ NIS ¤Îµ¡Ç½¤Ï¡¢¤³¤Î¤è¤¦¤Ê¾õ¶·¤ËÂн褹¤ë¤¿¤á¤ËÍøÍѤǤ­¤Þ¤¹¡£ ¤½¤ÎÊýË¡¤Î°ì¤Ä¤Ï¡¢Ìò³äÊ̤Υͥåȥ°¥ë¡¼¥×¤òºî¤ë¤³¤È¤Ç¤¹¡£ ¤¿¤È¤¨¤Ð¡¢½ÅÍפʥµ¡¼¥Ð¤Ø¤Î¥í¥°¥¤¥óÀ©¸Â¤òÄêµÁ¤¹¤ë¤¿¤á¤Ë BIGSRV ¤È¤¤¤¦¥Í¥Ã¥È¥°¥ë¡¼¥×¤òºî¤ê ¤¢¤Þ¤ê½ÅÍפǤϤʤ¤¥µ¡¼¥Ð¤Ø¤Ï SMALLSRV ¤È¤¤¤¦¥Í¥Ã¥È¥°¥ë¡¼¥×¤ò¡¢¤½¤·¤Æ°ìÈ̤Υ¥¯¥¹¥Æ¡¼¥·¥ç¥óÍÑ¤Ë USERBOX ¤È¤¤¤¦Âè 3 ¤Î¥Í¥Ã¥È¥°¥ë¡¼¥×¤ò ºî¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤ì¤é¤Î¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î³Æ¡¹¤Ï¡¢ ³Æ¥Þ¥·¥ó¤Ë¥í¥°¥¤¥ó¤¹¤ë¤³¤È¤òµö¤µ¤ì¤¿¥Í¥Ã¥È¥°¥ë¡¼¥×¤ò´Þ¤ß¤Þ¤¹¡£ ¤¢¤Ê¤¿¤Î NIS ¥Þ¥Ã¥×¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î¿·¤·¤¤¥¨¥ó¥È¥ê¤Ï¡¢ °Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ë¤Ï¤º¤Ç¤¹¡£

BIGSRV    IT_EMP  IT_APP
SMALLSRV  IT_EMP  IT_APP  ITINTERN
USERBOX   IT_EMP  ITINTERN USERS

¤³¤Î¥í¥°¥¤¥óÀ©¸Â¤ÎÄêµÁË¡¤Ï¡¢ Ʊ°ì¤ÎÀ©¸Â¤ò»ý¤Ä¥Þ¥·¥ó¤Î¥°¥ë¡¼¥×¤òÄêµÁ¤Ç¤­¤ë¤È¤­¤Ë¤ÏÊØÍø¤Ê¤â¤Î¤Ç¤¹¡£ »ÄÇ°¤Ê¤¬¤é¤³¤Î¤è¤¦¤Ê¥±¡¼¥¹¤ÏÎ㳰Ū¤Ê¤â¤Î¤Ç¤¹¡£ ¤Û¤È¤ó¤É¤Î¾ì¹ç¡¢ ³Æ¥Þ¥·¥ó¤Ë´ð¤Å¤¯¥í¥°¥¤¥óÀ©¸Â¤ÎÄêµÁµ¡Ç½¤¬É¬ÍפȤʤë¤Ç¤·¤ç¤¦¡£

¥Þ¥·¥ó¤´¤È¤Î¥Í¥Ã¥È¥°¥ë¡¼¥×¤ÎÄêµÁ¤Ï¡¢ ¾å½Ò¤·¤¿¤è¤¦¤Ê¥Ý¥ê¥·¤ÎÊѹ¹¤ò°·¤¦¤³¤È¤¬¤Ç¤­¤ë¤â¤¦¤Ò¤È¤Ä¤ÎÊýË¡¤Ç¤¹¡£ ¤³¤Î¥·¥Ê¥ê¥ª¤Ç¤Ï¡¢³Æ¥Þ¥·¥ó¤Î /etc/master.passwd ¤Ï “+” ¤Ç»Ï¤Þ¤ë 2 ¤Ä¤Î¹Ô¤«¤é¤Ê¤ê¤Þ¤¹¡£ ºÇ½é¤Î¤â¤Î¤Ï¤½¤Î¥Þ¥·¥ó¤Ø¤Î¥í¥°¥¤¥ó¤òµö¤µ¤ì¤¿¥¢¥«¥¦¥ó¥È¤òÄɲ乤ë¤â¤Î¤Ç¡¢ 2 ÈÖÌܤϤ½¤Î¾¤Î¥¢¥«¥¦¥ó¥È¤ò /sbin/nologin ¤ò¥·¥§¥ë¤È¤·¤ÆÄɲ乤ë¤â¤Î¤Ç¤¹¡£ ¥Þ¥·¥ó̾¤ò¤¹¤Ù¤ÆÂçʸ»ú¤Çµ­½Ò¤·¤¿¤â¤Î¤ò¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î̾Á°¤È¤·¤Æ»È¤¦¤Î¤ÏÎɤ¤¹Í¤¨¤Ç¤¹¡£ ¸À¤¤´¹¤¨¤ì¤Ð¡¢·ï¤Î¹Ô¤Ï¼¡¤Î¤è¤¦¤Ë¤Ê¤ë¤Ï¤º¤Ç¤¹¡£

+@BOXNAME:::::::::
+:::::::::/sbin/nologin

°ìÅÙ¡¢³Æ¥Þ¥·¥ó¤ËÂФ·¤Æ¤³¤Îºî¶È¤òºÑ¤Þ¤»¤Æ¤·¤Þ¤¨¤Ð¡¢ ÆóÅÙ¤È¥í¡¼¥«¥ë¤Î /etc/master.passwd ¤òÊÔ½¸¤¹¤ëɬÍפ¬¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£ °Ê¹ß¤Î¤¹¤Ù¤Æ¤ÎÊѹ¹¤Ï NIS ¥Þ¥Ã¥×¤ÎÊÔ½¸¤Ç°·¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ °Ê²¼¤Ï¤³¤Î¥·¥Ê¥ê¥ª¤ËÂбþ¤¹¤ë¥Í¥Ã¥È¥°¥ë¡¼¥×¥Þ¥Ã¥×¤Ë¡¢ ¤¤¤¯¤Ä¤«¤ÎÊØÍø¤ÊÄêµÁ¤òÄɲä·¤¿Îã¤Ç¤¹¡£

# Define groups of users first
IT_EMP    (,alpha,test-domain)    (,beta,test-domain)
IT_APP    (,charlie,test-domain)  (,delta,test-domain)
DEPT1     (,echo,test-domain)     (,foxtrott,test-domain)
DEPT2     (,golf,test-domain)     (,hotel,test-domain)
DEPT3     (,india,test-domain)    (,juliet,test-domain)
ITINTERN  (,kilo,test-domain)     (,lima,test-domain)
D_INTERNS (,able,test-domain)     (,baker,test-domain)
#
# Now, define some groups based on roles
USERS     DEPT1   DEPT2     DEPT3
BIGSRV    IT_EMP  IT_APP
SMALLSRV  IT_EMP  IT_APP    ITINTERN
USERBOX   IT_EMP  ITINTERN  USERS
#
# And a groups for a special tasks
# Allow echo and golf to access our anti-virus-machine
SECURITY  IT_EMP  (,echo,test-domain)  (,golf,test-domain)
#
# machine-based netgroups
# Our main servers
WAR       BIGSRV
FAMINE    BIGSRV
# User india needs access to this server
POLLUTION  BIGSRV  (,india,test-domain)
#
# This one is really important and needs more access restrictions
DEATH     IT_EMP
#
# The anti-virus-machine mentioned above
ONE       SECURITY
#
# Restrict a machine to a single user
TWO       (,hotel,test-domain)
# [...more groups to follow]

¤â¤·¥æ¡¼¥¶¥¢¥«¥¦¥ó¥È¤ò´ÉÍý¤¹¤ë¤Î¤Ë¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎÎà¤ò»È¤Ã¤Æ¤¤¤ë¤Ê¤é¡¢ ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥ì¥Ý¡¼¥È¥Ä¡¼¥ë¤«¤é¥Þ¥Ã¥×¤ÎºÇ½é¤ÎÉôʬ¤òºî¤ì¤ë¤è¤¦¤Ë¤¹¤ë¤Ù¤­¤Ç¤¹¡£ ¤½¤¦¤¹¤ì¤Ð¡¢¿·¤·¤¤¥æ¡¼¥¶¤Ï¼«Æ°Åª¤Ë¥Þ¥·¥ó¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤ë¤Ç¤·¤ç¤¦¡£

ºÇ¸å¤Ë»ÈÍѾå¤ÎÃí°Õ¤ò: ¥Þ¥·¥óÊ̤Υͥåȥ°¥ë¡¼¥×¤ò»È¤¦¤³¤È¤¬¾ï¤Ë¸­ÌÀ¤È¤¤¤¦¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ ¤¢¤Ê¤¿¤¬¿ô¥À¡¼¥¹¤«¤é¿ôÉ´¤ÎƱ°ì¤Î´Ä¶­¤Î¥Þ¥·¥ó¤ò³ØÀ¸¤Î¸¦µæ¼¼¤ËÇÛÃÖ¤·¤Æ¤¤¤ë¤Î¤Ê¤é¤Ð¡¢ NIS ¥Þ¥Ã¥×¤Î¥µ¥¤¥º¤ò¼êº¢¤ÊÈϰϤ˲¡¤µ¤¨¤ë¤¿¤á¤Ë¡¢ ¥Þ¥·¥óÊ̤Υͥåȥ°¥ë¡¼¥×¤Î¤«¤ï¤ê¤ËÌò³äÊ̤Υͥåȥ°¥ë¡¼¥×¤ò»È¤¦¤Ù¤­¤Ç¤¹¡£

22.9.8. ˺¤ì¤Æ¤Ï¤¤¤±¤Ê¤¤¤³¤È

NIS ´Ä¶­¤Ë¤¢¤ëº£¡¢ º£¤Þ¤Ç¤È¤Ï°ã¤Ã¤¿¤ä¤êÊý¤¬É¬Íפʤ³¤È¤¬¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹¡£

22.9.9. NIS v1 ¤È¤Î¸ß´¹À­

FreeBSD ¤Î ypserv ¤Ï¡¢ NIS v1 ¥¯¥é¥¤¥¢¥ó¥È¤òÉôʬŪ¤Ë¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£ FreeBSD ¤Î NIS ¼ÂÁõ¤Ï NIS v2 ¥×¥í¥È¥³¥ë¤Î¤ß¤ò»ÈÍѤ·¤Æ¤¤¤Þ¤¹¤¬¡¢ ¤Û¤«¤Î¼ÂÁõ¤Ç¤Ï¡¢¸Å¤¤¥·¥¹¥Æ¥à¤È¤Î²¼°Ì¸ß´¹À­¤ò»ý¤¿¤»¤ë¤¿¤á v1 ¥×¥í¥È¥³¥ë¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¤â¤Î¤â¤¢¤ê¤Þ¤¹¡£ ¤½¤Î¤è¤¦¤Ê¥·¥¹¥Æ¥à¤ËÉÕ¤¤¤Æ¤¤¤ë ypbind ¥Ç¡¼¥â¥ó¤Ï¡¢ ɬÍפ¬¤Ê¤¤¤Ë¤â¤«¤«¤ï¤é¤º NIS v1 ¤Î¥µ¡¼¥Ð¤È¤Î·ë¹ç¤òÀ®Î©¤µ¤»¤è¤¦¤È¤·¤Þ¤¹ (¤·¤«¤â v2 ¥µ¡¼¥Ð¤«¤é¤Î±þÅú¤ò¼õ¿®¤·¤¿¸å¤Ç¤â¡¢ ¥Ö¥í¡¼¥É¥­¥ã¥¹¥È¤ò¤·Â³¤±¤ë¤«¤âÃΤì¤Þ¤»¤ó)¡£ FreeBSD ¤Î ypserv ¤Ï¡¢ ¥¯¥é¥¤¥¢¥ó¥È¤«¤é¤ÎÄ̾ï¤Î¥ê¥¯¥¨¥¹¥È¤Ï¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¤¬¡¢ v1 ¤Î¥Þ¥Ã¥×žÁ÷¥ê¥¯¥¨¥¹¥È¤Ï¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ ¤Ä¤Þ¤ê FreeBSD ¤Î ypserv ¤ò¡¢ v1 ¤À¤±¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤è¤¦¤Ê¸Å¤¤ NIS ¥µ¡¼¥Ð¤ÈÁȤ߹ç¤ï¤»¤Æ ¥Þ¥¹¥¿¡¼¤ä¥¹¥ì¡¼¥Ö¥µ¡¼¥Ð¤È¤·¤Æ»È¤¦¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£ ¹¬¤¤¤Ê¤³¤È¤Ë¡¢¸½ºß¡¢¤½¤Î¤è¤¦¤Ê¥µ¡¼¥Ð¤¬»È¤ï¤ì¤Æ¤¤¤ë¤³¤È¤Ï ¤Û¤È¤ó¤É¤Ê¤¤¤Ç¤·¤ç¤¦¡£

22.9.10. NIS ¥¯¥é¥¤¥¢¥ó¥È¤È¤·¤Æ¤âÆ°ºî¤·¤Æ¤¤¤ë NIS ¥µ¡¼¥Ð

Ê£¿ô¤Î¥µ¡¼¥Ð¤¬Â¸ºß¤·¡¢¥µ¡¼¥Ð¼«¿È¤¬ NIS ¥¯¥é¥¤¥¢¥ó¥È¤Ç¤â¤¢¤ë¤è¤¦¤Ê¥É¥á¥¤¥ó¤Ç ypserv ¤¬¼Â¹Ô¤µ¤ì¤ë¾ì¹ç¤Ë¤ÏÃí°Õ¤¬É¬ÍפǤ¹¡£ °ìÈÌŪ¤ËÎɤ¤¤È¤µ¤ì¤Æ¤¤¤ë¤Î¤Ï¡¢ ¾¤Î¥µ¡¼¥Ð¤È·ë¹ç¤ò¤Ä¤¯¤ë¤è¤¦¤Ë¥Ö¥í¡¼¥É¥­¥ã¥¹¥È¤µ¤»¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢ ¥µ¡¼¥Ð¤ò¤½¤ì¼«¿È¤Ë·ë¹ç¤µ¤»¤ë¤³¤È¤Ç¤¹¡£ ¤â¤·¡¢¥µ¡¼¥ÐƱ»Î¤¬°Í¸´Ø·¸¤ò»ý¤Ã¤Æ¤¤¤Æ¡¢°ì¤Ä¤Î¥µ¡¼¥Ð¤¬Ää»ß¤¹¤ë¤È¡¢ ´ñ̯¤Ê¥µ¡¼¥Ó¥¹ÉÔǽ¾õÂ֤˴٤뤳¤È¤¬¤¢¤ê¤Þ¤¹¡£ ¤½¤Î·ë²Ì¡¢¤¹¤Ù¤Æ¤Î¥¯¥é¥¤¥¢¥ó¥È¤Ï¥¿¥¤¥à¥¢¥¦¥È¤òµ¯¤³¤·¤Æ ¾¤Î¥µ¡¼¥Ð¤Ë·ë¹ç¤·¤è¤¦¤È»î¤ß¤Þ¤¹¤¬¡¢ ¤³¤ì¤Ë¤«¤«¤ë»þ´Ö¤Ï¤«¤Ê¤êÂ礭¤¯¡¢ ¥µ¡¼¥ÐƱ»Î¤¬¤Þ¤¿¸ß¤¤¤Ë·ë¹ç¤·¤Æ¤·¤Þ¤Ã¤¿¤ê¤¹¤ë¤È¡¢ ¥µ¡¼¥Ó¥¹ÉÔǽ¾õÂ֤Ϥµ¤é¤Ë·Ñ³¤¹¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£

ypbind ¤Ë -S ¥ª¥×¥·¥ç¥ó¥Õ¥é¥°¤ò»ØÄꤷ¤Æ¼Â¹Ô¤¹¤ë¤³¤È¤Ç¡¢ ¥Û¥¹¥È¤òÆÃÄê¤Î¥µ¡¼¥Ð¤Ë·ë¹ç¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£ NIS ¥µ¡¼¥Ð¤òºÆµ¯Æ°¤¹¤ë¤¿¤Ó¤Ë¡¢¤³¤ì¤ò¼êÆ°¤Ç¹Ô¤¤¤¿¤¯¤Ê¤¤¤Ê¤é¡¢ ¼¡¤Î¹Ô¤ò /etc/rc.conf ¤ËÄɲ乤ì¤Ð¤è¤¤¤Ç¤·¤ç¤¦¡£

nis_client_enable="YES"	# run client stuff as well
nis_client_flags="-S NIS domain,server"

¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï ypbind(8) ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£

22.9.11. ¥Ñ¥¹¥ï¡¼¥É·Á¼°

NIS ¤ò¼ÂÁõ¤·¤è¤¦¤¹¤ë¿Í¤Îï¤â¤¬¤Ö¤Ä¤«¤ëÌäÂê¤Î°ì¤Ä¤Ë¡¢ ¥Ñ¥¹¥ï¡¼¥É·Á¼°¤Î¸ß´¹À­¤¬¤¢¤ê¤Þ¤¹¡£ NIS ¥µ¡¼¥Ð¤¬ DES °Å¹æ²½¥Ñ¥¹¥ï¡¼¥É»È¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢ ƱÍÍ¤Ë DES ¤ò»ÈÍѤ·¤Æ¤¤¤ë¥¯¥é¥¤¥¢¥ó¥È¤·¤«Âбþ¤Ç¤­¤Þ¤»¤ó¡£ ¤¿¤È¤¨¤Ð Solaris¡¨ ¤Î NIS ¥¯¥é¥¤¥¢¥ó¥È¤¬¥Í¥Ã¥È¥ï¡¼¥¯Æâ¤Ë¤¢¤ë¾ì¹ç¡¢ ¤Û¤Ü³Î¼Â¤Ë DES °Å¹æ²½¥Ñ¥¹¥ï¡¼¥É¤ò»ÈÍѤ·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤Ç¤·¤ç¤¦¡£

¥µ¡¼¥Ð¤È¥¯¥é¥¤¥¢¥ó¥È¤¬¤É¤Î¥é¥¤¥Ö¥é¥ê¤ò»ÈÍѤ·¤Æ¤¤¤ë¤«¤Ï¡¢ /etc/login.conf ¤ò³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£ ¥Û¥¹¥È¤¬ DES °Å¹æ¥Ñ¥¹¥ï¡¼¥É¤ò»ÈÍѤ¹¤ë¤è¤¦¤ËÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢ default ¥¯¥é¥¹¤Ë¤Ï°Ê²¼¤Î¤è¤¦¤Ê¥¨¥ó¥È¥ê¤¬´Þ¤Þ¤ì¤Þ¤¹¡£

default:\
    :passwd_format=des:\
    :copyright=/etc/COPYRIGHT:\
    [Further entries elided]

passwd_format ÆÃÀ­¤Ë¤Ä¤¤¤Æ¾¤ËÍøÍѲÄǽ¤ÊÃÍ¤Ï blf ¤ª¤è¤Ó md5 (¤½¤ì¤¾¤ì Blowfish ¤ª¤è¤Ó MD5 °Å¹æ²½¥Ñ¥¹¥ï¡¼¥É) ¤Ç¤¹¡£

/etc/login.conf ¤òÊѹ¹¤·¤¿¤È¤­¤Ï¡¢ ¥í¥°¥¤¥óÆÃÀ­¥Ç¡¼¥¿¥Ù¡¼¥¹¤âºÆ¹½ÃÛ¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ ¤³¤ì¤Ï root ¸¢¸Â¤Ç²¼µ­¤Î¤è¤¦¤Ë¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ì¤Ð¤Ç¤­¤Þ¤¹¡£

# cap_mkdb /etc/login.conf

注意: ¤¹¤Ç¤Ë /etc/master.passwd Æâ¤Ëµ­Ï¿¤µ¤ì¤Æ¤¤¤ë¥Ñ¥¹¥ï¡¼¥É·Á¼°¤Ï¡¢ ¥í¥°¥¤¥óÆÃÀ­¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬ºÆ¹½ÃÛ¤µ¤ì¤¿¸å¡¢ ¥æ¡¼¥¶¤¬Èà¤é¤Î¥Ñ¥¹¥ï¡¼¥É¤ò¤Ï¤¸¤á¤ÆÊѹ¹¤¹¤ë¤Þ¤ÇÊѹ¹¤µ¤ì¤Ê¤¤¤Ç¤·¤ç¤¦¡£

¼¡¤Ë¡¢ ¥Ñ¥¹¥ï¡¼¥É¤¬ÁªÂò¤·¤¿·Á¼°¤Ç°Å¹æ²½¤µ¤ì¤ë¤³¤È¤ò³Î¼Â¤Ë¤¹¤ë¤¿¤á¤Ë¡¢ ¤µ¤é¤Ë /etc/auth.conf Æâ¤Î crypt_default ¤Ë¤ª¤¤¤Æ¡¢ ÁªÂò¤·¤¿¥Ñ¥¹¥ï¡¼¥É·Á¼°¤Ë¹â¤¤Í¥Àè½ç°Ì¤¬¤Ä¤¤¤Æ¤¤¤ë¤³¤È¤â³Îǧ¤·¤Æ¤¯¤À¤µ¤¤¡£ ¤½¤¦¤¹¤ë¤¿¤á¤Ë¤Ï¡¢ÁªÂò¤·¤¿·Á¼°¤ò¥ê¥¹¥È¤ÎÀèƬ¤ËÃÖ¤¤¤Æ¤¯¤À¤µ¤¤¡£ ¤¿¤È¤¨¤Ð DES °Å¹æ²½¤µ¤ì¤¿¥Ñ¥¹¥ï¡¼¥É¤ò»ÈÍѤ¹¤ë¤È¤­¤Ï¡¢ ¥¨¥ó¥È¥ê¤Ï¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£

crypt_default	=	des blf md5

FreeBSD ¾å¤Î³Æ NIS ¥µ¡¼¥Ð¤ª¤è¤Ó¥¯¥é¥¤¥¢¥ó¥È¤Ë¤ª¤¤¤Æ¾åµ­¤Î¼ê½ç¤Ë½¾¤¨¤Ð¡¢ ¥Í¥Ã¥È¥ï¡¼¥¯Æâ¤Ç¤É¤Î¥Ñ¥¹¥ï¡¼¥É·Á¼°¤¬»ÈÍѤµ¤ì¤ë¤«¤¬ ¤½¤ì¤é¤Î¥Þ¥·¥ó´Ö¤ÇÀ°¹ç¤µ¤ì¤Æ¤¤¤ë¤È¤¤¤¦¤³¤È¤ò³Î¿®¤Ç¤­¤Þ¤¹¡£ NIS ¥¯¥é¥¤¥¢¥ó¥È¾å¤ÇÌäÂ꤬¤¢¤ì¤Ð¡¢ ¤³¤³¤«¤éÌäÂê¤È¤Ê¤ê¤½¤¦¤ÊÉôʬ¤òõ¤¹¤ÈÎɤ¤¤Ç¤·¤ç¤¦¡£ ³Ð¤¨¤Æ¤ª¤¤¤Æ¤¯¤À¤µ¤¤: °Û¼ïº®ºß¥Í¥Ã¥È¥ï¡¼¥¯¤Ë NIS ¥µ¡¼¥Ð¤òÇÛÃÖ¤·¤¿¤¤¤È¤­¤Ë¤Ï¡¢ DES ¤¬ºÇÂç¸øÌó¿ôŪ¤Êɸ½à¤È¤Ê¤ë¤Ç¤·¤ç¤¦¤«¤é¡¢ ¤¹¤Ù¤Æ¤Î¥·¥¹¥Æ¥à¤Ç DES ¤ò»ÈÍѤ·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£

ËÜʸ½ñ¡¢¤ª¤è¤Ó¾¤Îʸ½ñ¤Ï ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/ ¤«¤é¥À¥¦¥ó¥í¡¼¥É¤Ç¤­¤Þ¤¹¡£

FreeBSD ¤Ë´Ø¤¹¤ë¼ÁÌ䤬¤¢¤ë¾ì¹ç¤Ë¤Ï¡¢¥É¥­¥å¥á¥ó¥È ¤òÆɤó¤À¾å¤Ç <questions@FreeBSD.org> ¤Þ¤Ç (±Ñ¸ì¤Ç) Ï¢Íí¤·¤Æ¤¯¤À¤µ¤¤¡£
ËÜʸ½ñ¤Ë´Ø¤¹¤ë¼ÁÌä¤Ë¤Ä¤¤¤Æ¤Ï¡¢<doc@FreeBSD.org> ¤Þ¤ÇÅŻҥ᡼¥ë¤ò (±Ñ¸ì¤Ç) Á÷¤Ã¤Æ¤¯¤À¤µ¤¤¡£