[Á°][¼¡][ÈÖ¹æ½ç°ìÍ÷][¥¹¥ì¥Ã¥É°ìÍ÷]

mysql:4182

From: Yasuhide OMORI / Â翹ÊÝ±Ñ <Yasuhide OMORI / Â翹ÊÝ±Ñ <omori@xxxxxxxxxx>>
Date: Fri, 17 Aug 2001 09:11:41 +0900
Subject: [mysql 04182] Re: nss-mysql ¤Ë¤è¤ëǧ¾Ú (Re: ¥¢¥«¥¦¥ó¥È´ÉÍý)

On Fri, Aug 17, 2001 at 12:59:58AM +0900,
tateyan <tateyan@xxxxxxxxxx> wrote:
> £±¡Ë¡¡nss_mysql.spec ¤Ç¡¡shadow ¤¬¥³¥á¥ó¥È¥¢¥¦¥È¤Ë¤Ê¤Ã¤Æ¤Þ¤¹¤¬
> ¡¡¡¡¡¡shadow ¥Ñ¥¹¥ï¡¼¥É¤Ï»È¤Ã¤Æ¤¤¤Ê¤¤¤Î¤Ç¤·¤ç¤¦¤«¡©

shadow ¤òÍ­¸ú¤Ë¤·¤ÆÆ°¤«¤Ê¤«¤Ã¤¿¤Î¤Ç¡¢¤è¤ê¥·¥ó¥×¥ë¤ÊÊý¤¬¤¤¤¤¤Î¤Ç¤Ï¤Ê¤¤
¤«¤È»×¤¤¡¢»î¤·¤Ë shadow ¤ò̵¸ú¤Ë¤·¤Æ¤¤¤Þ¤¹¡£
¥·¥¹¥Æ¥à¤Î¦¤ÎÀßÄê¤È¤·¤Æ¤Ï¡¢shadow + MD5 password ¤Ç¤¹¡£

> £²¡Ë¥æ¡¼¥¶hoho ¤ËÆþ¤ì¤Æ¤ë¥Ñ¥¹¥ï¡¼¥É¤ÏÀ¸¥Ñ¥¹¥ï¡¼¥É¤Ç¤Ï¤Ê¤¤¤Ç¤¹¤è¤Í¡©
> ¡¡¡¡¤³¤³¤ËÆþ¤ì¤ë¤Ù¤­¥Ñ¥¹¥ï¡¼¥É¤Ï crypt¥¨¥ó¥³¡¼¥É¤µ¤ì¤¿¤â¤Î¤«
> ¡¡¡¡¤¢¤ë¤¤¤ÏMD5¤Ç¥¨¥ó¥³¡¼¥É¤µ¤ì¤¿¥Ñ¥¹¥ï¡¼¥É¤¬É¬ÍפǤ¹
> 
> ¡¡¡¡¡¡À¸¤Ç¤¢¤ì¤Ð encrypt('hoppfcCGi9P8I') ¤È½ñ¤¯¤³¤È¤â¤Ç¤­¤Þ¤¹
> ¡¡¡¡¡¡salt¤ò»ØÄꤹ¤ë¤Ê¤é¤Ð¡¡encrypt('hoppfcCGi9P8I','xx')
>        salt ¤Ï°Å¹æ²½¤Î¤¿¤á¤Î¼ï¡¡xx ¤ÏǤ°Õ¤Î£²Ê¸»ú
> ¡¡¡¡¡¡¡¡¡Ê¤·¤Ã¤Æ¤Þ¤¹¤è¤ÍÇ°¤Î¤¿¤á¡Ë
> ¡¡¡¡¡¡¡ôgrant ¤Ç½ñ¤¯¥Ñ¥¹¥ï¡¼¥É¤ÏÀ¸¤Ç¤¹¤¬¡¢¤³¤ÎÉôʬ¤Ï°ã¤¤¤Þ¤¹¤Î¤Ç
> ¡¡¡¡¡¡¡ôº®Æ±¤·¤Ê¤¤¤è¤¦¤Ë¤Í¤§

encrypt ´Ø¿ô¤ÏÃΤê¤Þ¤»¤ó¤Ç¤·¤¿¡£¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£

$ perl -e "print crypt('password','XX')"

¤È¤«¤¤¤¦É÷¤Ë¼Â¹Ô¤·¤Æ password ¥¨¥ó¥È¥ê¤òºîÀ®¤·¤Æ¤Þ¤·¤¿¡£

> ¤³¤ÎÊÕ¤Înss_ ¤Ë´Ö¤¹¤ë¾ðÊó¤È¤·¤Æ¤Ï¤¢¤È¤Ï
> /etc/nsswitch.conf ¤¬¤É¤¦ÀßÄꤷ¤Æ¤¤¤ë¤«
> ¤È¤¤¤¦¤Î¤â¾ðÊó¤È¤·¤Æ¤ÏɬÍפǤ¹
> 
> °ÊÁ°½ñ¤¤¤¿¤â¤Î¤Ç¤Ï
> passwd:         files mysql
> group:          files mysql
> shadow:         files mysql
> 
> ¤Ç¤¹¤¬¡¡¤¿¤¤¤Æ¤¤¤Ïcompat¤Ä¤«¤Ã¤Æ¤¿¤ê¤·¤Þ¤¹¤Î¤Ç
> passwd:         compat mysql
> group:          compat mysql
> shadow:         compat mysql
> ¤Ç¤â²Ä¤Ç¤·¤¿

$ egrep '^(passwd|group|shadow):' /etc/nsswitch.conf 
passwd:     files nisplus nis mysql
shadow:     files nisplus nis mysql
group:      files nisplus nis mysql

¤È¤¤¤¦ÆâÍƤǡ¢Êѹ¹ÆâÍƤÏ

$ rcsdiff -u /etc/nsswitch.conf 
===================================================================
RCS file: /etc/RCS/nsswitch.conf,v
retrieving revision 1.1
diff -u -r1.1 /etc/nsswitch.conf
--- /etc/nsswitch.conf  2001/08/06 07:24:28     1.1
+++ /etc/nsswitch.conf  2001/08/16 02:23:30
@@ -30,9 +30,9 @@
 #shadow:    db files nisplus nis
 #group:     db files nisplus nis
 
-passwd:     files nisplus nis
-shadow:     files nisplus nis
-group:      files nisplus nis
+passwd:     files nisplus nis mysql
+shadow:     files nisplus nis mysql
+group:      files nisplus nis mysql
 
 #hosts:     db files nisplus nis dns
 hosts:      files nisplus nis dns

¤È¤¤¤¦¤¢¤ó¤Ð¤¤¤Ç¤¹¡£

> > ¾åµ­¤Î SQL ʸ¤ò¼Â¹Ô¤·¤¿¾å¤Çǧ¾Ú¤ò»î¤ß¤Þ¤·¤¿¤¬¡¢¤ä¤Ï¤ê¥í¥°¤ò¸«¤ë¸Â¤ê¤Ç
> > ¤Ï password ¤ò SELECT ¤·¤Æ¤¤¤ëÍͻҤϤʤ¯¡¢/var/log/messages ¤Ç¤Ï
> > 
> > Aug 16 11:25:19 vine libnss_mysql[2307]: endpwent called
> > Aug 16 11:25:19 vine libnss_mysql[2307]: endpwent: pwent was NULL
> > Aug 16 11:25:19 vine libnss_mysql[2307]: endpwent finished
> > 
> > ¤È¤¤¤¦É÷¤Ê¥í¥°¤¬Íî¤Á¤Æ¤¤¤Þ¤·¤¿¡£
> ¤È¤¤¤¦¤³¤È¤Ï¡¡libnss_mysql¤Ïǧ¼±¤µ¤ì¤Æ¤Þ¤¹¤Î¤Ç
> ¤¢¤È¤Ï¡¡ËÜÅö¤ËÀßÄê¥Õ¥¡¥¤¥ë¤«¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó¤¬°­¤¤¤À¤±¤È»×¤¤¤Þ¤¹

»ÅÀÚ¤ê¤Ê¤ª¤·¤¿Êý¤¬Áᤫ¤Ã¤¿¤ê¤¹¤ë¤Î¤«¤Ê¤¡¡Ä?

> > MySQL-3.23.37
> > glibc-2.1.3
> > linux-2.2.18
> > (Vine-2.1.5 + updates)
> > 
> > ¤È¤¤¤¦´Ä¶­¤Ê¤Î¤Ç¤¹¤¬¡Ä°ìÂΤɤ³¤ËÌäÂ꤬¤¢¤ë¤Î¤Ç¤·¤ç¤¦¤«?
> > 
> > ¥½¡¼¥¹¤ò¤Á¤ç¤Ã¤ÈÆɤó¤Ç¤ß¤¿¤Î¤Ç¤¹¤¬¡¢_nss_mysql_endpwent ¤Î¸Æ½Ð¸µ¤¬²¿¤Ê
> > ¤Î¤«¡¢¤µ¤Ã¤Ñ¤êʬ¤«¤é¤ººÃÀÞ¤·¤Þ¤·¤¿ (;_;)
> ¤¨¤Ã¤È¡¡¤³¤ÎÊդϤ⤦¡¡man nsswitch.conf ¤«¤é¤¿¤É¤Ã¤¿¤ê¤·¤Ê¤±¤ì¤Ð...
> ¤·¤Þ¤¤¤Ë¤Ï¡¡pam ¤â¤«¤«¤ï¤Ã¤Æ¤­¤Æ...
> Æͤùþ¤Þ¤ì¤ë¤È»ä¤â¤ª¼ê¾å¤²¤Ç¤¹

GNU/Linux ¤Î¾ì¹ç¡¢nss ´Ø·¸¤Ï info libc ¤òÆɤà¤Î¤¬°ìÈÖ¤¤¤¤¤Î¤Ç¤·¤ç¤¦¤«¡Ä?

PAM ¤Î¦¤Ç»²¹Í¤Ë¤Ê¤ë¤Î¤Ï
http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam_modules.html
¤¢¤¿¤ê¤¬°ì¼¡¾ðÊó¤Î¤è¤¦¤Ç¤¹¡£

ÊÌÃʵޤ¤¤Ç¤¤¤ëÌõ¤Ç¤Ï¤Ê¤¤¤Î¤Ç¤¹¤¬¡¢Â¿Ê¬¾¯¤·¤º¤Ä»þ´Ö¤ò¼è¤Ã¤Æ¾Ã²½¤·¤Æ¤ª¤«
¤Ê¤¤¤È´Î¿´¤Ê¤È¤­¤Ë¤Ê¤Ã¤Æ¾Ç¤ë¤³¤È¤Ë¤Ê¤ê¤½¤¦¡Ä¡£

> ¤Õ¤¦¡¡¥Ç¥£¥¹¥¯¥¯¥é¥Ã¥·¥å¤Ç¡¡¤è¤¦¤ä¤¯¥á¡¼¥ë¤ä¤ê¼è¤ê¤Ç¤­¤ë´Ä¶­¤Ë¤Ê¤Ã¤¿

¤ªÈè¤ì¤µ¤Þ¤Ç¤¹¡£
»ä¤Î¼«Âð¥Þ¥·¥ó¤Ï 7/29 ¤Ë¥×¥é¥¤¥Þ¥ê¥Þ¥¹¥¿¤Î HDD (Win 95 ÍÑ) ¤¬¤ªË´¤¯¤Ê
¤ê¤Ë¤Ê¤Ã¤Æ¡¢¤½¤ì°ÊÍèÅŸ»Æþ¤ì¤Æ¤Þ¤»¤ó ^^;;;
-- 
Yasuhide OMORI / Â翹ÊݱÑ

[Á°][¼¡][ÈÖ¹æ½ç°ìÍ÷][¥¹¥ì¥Ã¥É°ìÍ÷]

      2707 2000-11-17 02:42 [tateyan <tateyan@xxx] ¥¢¥«¥¦¥ó¥È´ÉÍý                          
      2710 2000-11-18 21:12 ¨²[Tatsuo Hiramatsu <ta]                                       
      2711 2000-11-19 00:32 ¨­¨²[¤È¤ß¤¿¤Þ¤µ¤Ò¤í <tomm]                                     
      2712 2000-11-19 00:50 ¨­¨±[inano <inano@xxxxxxx]                                     
      2721 2000-11-19 19:25 ¨­¡¡¨±[Tatsuo Hiramatsu <ta] Ê¡²¬»ÙÉô¡©                        
      2726 2000-11-21 14:29 ¨­¡¡¡¡¨²[Tatsuo Hiramatsu <ta]                                 
      2727 2000-11-21 15:37 ¨­¡¡¡¡¨±[Tatsuo Hiramatsu <ta]                                 
      2730 2000-11-24 11:53 ¨­¡¡¡¡¡¡¨±[Michiaki Mitachi <mi]                               
      2731 2000-11-24 14:14 ¨­¡¡¡¡¡¡¡¡¨±[Tatsuo Hiramatsu <ta]                             
      2732 2000-11-24 20:55 ¨­¡¡¡¡¡¡¡¡¡¡¨±[inano <inano@xxxxxxx]                           
      2734 2000-11-25 19:14 ¨­¡¡¡¡¡¡¡¡¡¡¡¡¨±[Tatsuo Hiramatsu <ta]                         
   @  4168 2001-08-13 20:06 ¨±[Yasuhide OMORI / Âç¿] nss-mysql ¤Ë¤è¤ëǧ¾Ú (Re:  ¥¢¥«¥¦¥ó¥È´ÉÍý)
      4169 2001-08-13 22:40 ¡¡¨±[tateyan <tateyan@xxx]                                     
      4170 2001-08-13 23:04 ¡¡¡¡¨±[tateyan <tateyan@xxx]                                   
      4176 2001-08-16 11:32 ¡¡¡¡¡¡¨±[Yasuhide OMORI / Âç¿]                                 
      4178 2001-08-16 20:17 ¡¡¡¡¡¡¡¡¨²[¤È¤ß¤¿¤Þ¤µ¤Ò¤í <tomm]                               
      4181 2001-08-17 08:52 ¡¡¡¡¡¡¡¡¨­¨±[Yasuhide OMORI / Âç¿]                             
      4180 2001-08-17 00:59 ¡¡¡¡¡¡¡¡¨±[tateyan <tateyan@xxx]                               
->    4182 2001-08-17 09:11 ¡¡¡¡¡¡¡¡¡¡¨±[Yasuhide OMORI / Âç¿]                             
      4183 2001-08-17 12:46 ¡¡¡¡¡¡¡¡¡¡¡¡¨±[Seiji Tateyama <tate]                           
      4184 2001-08-17 23:04 ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¨±[tateyan <tateyan@xxx]