NIS: how to fetch input files from another directory than /etc (please, i am desperated)
Dear gentleman, i am trying to get nis to build their maps from files located in another directory than /etc. So, my Makefile (inside /var/yp/`domainname`) has the following lines : YPDBDIR=/var/yp DIR=/asd/etc AMDDIR=/asd/etc/amd NOPUSH= UNSECURE= USEDNS=-b So my ideia is to grab as input, passwd and group files from /asd/etc; all others are empty. My group file inside /asd/etc is: its:*:1000: asd:*:1001:sioux dba:*:1002:sioux wbx:*:1003: alg:*:1004:sioux djb:*:1005: nofiles:*:1006: qmail:*:1007: ftp:*:1008: ord:*:2000: adc:*:2001: bod:*:2002: frn:*:2003: And my master.passwd is: sioux:$2a$08$B8PLPgdw18I.TlnZC8RnZezg1Ed8gQL8WU/4rpxdyGdOk/PO/9Ude:1000:1000:mojave:0:0::/home/sioux:/bin/sh mysql:*:1001:1002:mojave:0:0::/home/mysql:/usr/bin/false oldap:*:1002:1002:mojave:0:0::/home/oldap:/usr/bin/false dnscache:*:1003:1005:mojave:0:0::/home/dnscache:/usr/bin/false dnslog:*:1004:1005:mojave:0:0::/home/dnslog:/usr/bin/false tinydns:*:1005:1005:mojave:0:0::/home/tinydns:/usr/bin/false ftp:*:1006:1008:mojave:0:0::/asd/var/ftp:/sbin/nologin alias:*:1007:1006:mojave:0:0::/var/qmail/alias:/usr/bin/true qmaild:*:1008:1006:mojave:0:0::/var/qmail:/usr/bin/true qmaill:*:1009:1006:mojave:0:0::/var/qmail:/usr/bin/true qmailp:*:1010:1006:mojave:0:0::/var/qmail:/usr/bin/true qmailq:*:1011:1007:mojave:0:0::/var/qmail:/usr/bin/true qmailr:*:1012:1007:mojave:0:0::/var/qmail:/usr/bin/true qmails:*:1013:1007:mojave:0:0::/var/qmail:/usr/bin/true Then i issued : # pwd_mkdb -d /asd/etc -s master.passwd # cd /var/yp/`domainname` # make Everything was built ok! But, the problem is the following: I cannot login as user sioux using the password i setted for it. But if i try the login as user sioux using a empty password () the authentication procedure passes. I can't understand what i am doing wrong? thanks a lot for your time and cooperation. Best regards.
Re: NIS: how to fetch input files from another directory than /etc (please, i am desperated)
Do you have any understanding of YP? You tell us that it builds ok. Is that all debugging you have done? Have you verified that you get the correct entry for sioux from master.passwd? ypmatch from root can be used to test that... ypcat and ypwhich is other tools you can use to debug... makedbm -u can be used to look at the compiled maps. -moj On Sat, 1 Sep 2007, Gustavo Rios wrote: Dear gentleman, i am trying to get nis to build their maps from files located in another directory than /etc. So, my Makefile (inside /var/yp/`domainname`) has the following lines : YPDBDIR=/var/yp DIR=/asd/etc AMDDIR=/asd/etc/amd NOPUSH= UNSECURE= USEDNS=-b So my ideia is to grab as input, passwd and group files from /asd/etc; all others are empty. My group file inside /asd/etc is: its:*:1000: asd:*:1001:sioux dba:*:1002:sioux wbx:*:1003: alg:*:1004:sioux djb:*:1005: nofiles:*:1006: qmail:*:1007: ftp:*:1008: ord:*:2000: adc:*:2001: bod:*:2002: frn:*:2003: And my master.passwd is: sioux:$2a$08$B8PLPgdw18I.TlnZC8RnZezg1Ed8gQL8WU/4rpxdyGdOk/PO/9Ude:1000:1000:mojave:0:0::/home/sioux:/bin/sh mysql:*:1001:1002:mojave:0:0::/home/mysql:/usr/bin/false oldap:*:1002:1002:mojave:0:0::/home/oldap:/usr/bin/false dnscache:*:1003:1005:mojave:0:0::/home/dnscache:/usr/bin/false dnslog:*:1004:1005:mojave:0:0::/home/dnslog:/usr/bin/false tinydns:*:1005:1005:mojave:0:0::/home/tinydns:/usr/bin/false ftp:*:1006:1008:mojave:0:0::/asd/var/ftp:/sbin/nologin alias:*:1007:1006:mojave:0:0::/var/qmail/alias:/usr/bin/true qmaild:*:1008:1006:mojave:0:0::/var/qmail:/usr/bin/true qmaill:*:1009:1006:mojave:0:0::/var/qmail:/usr/bin/true qmailp:*:1010:1006:mojave:0:0::/var/qmail:/usr/bin/true qmailq:*:1011:1007:mojave:0:0::/var/qmail:/usr/bin/true qmailr:*:1012:1007:mojave:0:0::/var/qmail:/usr/bin/true qmails:*:1013:1007:mojave:0:0::/var/qmail:/usr/bin/true Then i issued : # pwd_mkdb -d /asd/etc -s master.passwd # cd /var/yp/`domainname` # make Everything was built ok! But, the problem is the following: I cannot login as user sioux using the password i setted for it. But if i try the login as user sioux using a empty password () the authentication procedure passes. I can't understand what i am doing wrong? thanks a lot for your time and cooperation. Best regards.
Re: NIS: how to fetch input files from another directory than /etc (please, i am desperated)
Let's go for a detailed report: My files are: lion# cat /asd/etc/master.passwd sioux:$2a$08$B8PLPgdw18I.TlnZC8RnZezg1Ed8gQL8WU/4rpxdyGdOk/PO/9Ude:1000:1000:mojave:0:0::/home/sioux:/bin/sh mysql:*:1001:1002:mojave:0:0::/home/mysql:/usr/bin/false oldap:*:1002:1002:mojave:0:0::/home/oldap:/usr/bin/false dnscache:*:1003:1005:mojave:0:0::/home/dnscache:/usr/bin/false dnslog:*:1004:1005:mojave:0:0::/home/dnslog:/usr/bin/false tinydns:*:1005:1005:mojave:0:0::/home/tinydns:/usr/bin/false ftp:*:1006:1008:mojave:0:0::/asd/var/ftp:/sbin/nologin alias:*:1007:1006:mojave:0:0::/var/qmail/alias:/usr/bin/true qmaild:*:1008:1006:mojave:0:0::/var/qmail:/usr/bin/true qmaill:*:1009:1006:mojave:0:0::/var/qmail:/usr/bin/true qmailp:*:1010:1006:mojave:0:0::/var/qmail:/usr/bin/true qmailq:*:1011:1007:mojave:0:0::/var/qmail:/usr/bin/true qmailr:*:1012:1007:mojave:0:0::/var/qmail:/usr/bin/true qmails:*:1013:1007:mojave:0:0::/var/qmail:/usr/bin/true grios:*:2002:2000:ordinary:0:0::/home/grios:/bin/sh lion# cat /asd/etc/passwd sioux:*:1000:1000::/home/sioux:/bin/sh mysql:*:1001:1002::/home/mysql:/usr/bin/false oldap:*:1002:1002::/home/oldap:/usr/bin/false dnscache:*:1003:1005::/home/dnscache:/usr/bin/false dnslog:*:1004:1005::/home/dnslog:/usr/bin/false tinydns:*:1005:1005::/home/tinydns:/usr/bin/false ftp:*:1006:1008::/asd/var/ftp:/sbin/nologin alias:*:1007:1006::/var/qmail/alias:/usr/bin/true qmaild:*:1008:1006::/var/qmail:/usr/bin/true qmaill:*:1009:1006::/var/qmail:/usr/bin/true qmailp:*:1010:1006::/var/qmail:/usr/bin/true qmailq:*:1011:1007::/var/qmail:/usr/bin/true qmailr:*:1012:1007::/var/qmail:/usr/bin/true qmails:*:1013:1007::/var/qmail:/usr/bin/true grios:*:2002:2000::/home/grios:/bin/sh lion# ypcat passwd alias:*:1007:1006::/var/qmail/alias:/usr/bin/true dnscache:*:1003:1005::/home/dnscache:/usr/bin/false dnslog:*:1004:1005::/home/dnslog:/usr/bin/false ftp:*:1006:1008::/asd/var/ftp:/sbin/nologin grios:*:2002:2000::/home/grios:/bin/sh mysql:*:1001:1002::/home/mysql:/usr/bin/false oldap:*:1002:1002::/home/oldap:/usr/bin/false qmaild:*:1008:1006::/var/qmail:/usr/bin/true qmaill:*:1009:1006::/var/qmail:/usr/bin/true qmailp:*:1010:1006::/var/qmail:/usr/bin/true qmailq:*:1011:1007::/var/qmail:/usr/bin/true qmailr:*:1012:1007::/var/qmail:/usr/bin/true qmails:*:1013:1007::/var/qmail:/usr/bin/true sioux:*:1000:1000::/home/sioux:/bin/sh tinydns:*:1005:1005::/home/tinydns:/usr/bin/false lion# ypcat master.passwd alias:*:1007:1006:mojave:0:0::/var/qmail/alias:/usr/bin/true dnscache:*:1003:1005:mojave:0:0::/home/dnscache:/usr/bin/false dnslog:*:1004:1005:mojave:0:0::/home/dnslog:/usr/bin/false ftp:*:1006:1008:mojave:0:0::/asd/var/ftp:/sbin/nologin grios:*:2002:2000:ordinary:0:0::/home/grios:/bin/sh mysql:*:1001:1002:mojave:0:0::/home/mysql:/usr/bin/false oldap:*:1002:1002:mojave:0:0::/home/oldap:/usr/bin/false qmaild:*:1008:1006:mojave:0:0::/var/qmail:/usr/bin/true qmaill:*:1009:1006:mojave:0:0::/var/qmail:/usr/bin/true qmailp:*:1010:1006:mojave:0:0::/var/qmail:/usr/bin/true qmailq:*:1011:1007:mojave:0:0::/var/qmail:/usr/bin/true qmailr:*:1012:1007:mojave:0:0::/var/qmail:/usr/bin/true qmails:*:1013:1007:mojave:0:0::/var/qmail:/usr/bin/true sioux:$2a$08$B8PLPgdw18I.TlnZC8RnZezg1Ed8gQL8WU/4rpxdyGdOk/PO/9Ude:1000:1000:mojave:0:0::/home/sioux:/bin/sh tinydns:*:1005:1005:mojave:0:0::/home/tinydns:/usr/bin/false lion# ypwhich -x Use passwd for passwd.byname Use group for group.byname Use networks for networks.byaddr Use hosts for hosts.byaddr Use protocols for protocols.bynumber Use services for services.byname Use aliases for mail.aliases Use ethers for ethers.byname lion# ypwhich localhost.my.domain lion# makedbm -u master.passwd.byname YP_LAST_MODIFIED 1188681297 YP_MASTER_NAME lion.my.domain YP_SECURE alias alias:*:1007:1006:mojave:0:0::/var/qmail/alias:/usr/bin/true dnscache dnscache:*:1003:1005:mojave:0:0::/home/dnscache:/usr/bin/false dnslog dnslog:*:1004:1005:mojave:0:0::/home/dnslog:/usr/bin/false ftp ftp:*:1006:1008:mojave:0:0::/asd/var/ftp:/sbin/nologin grios grios:*:2002:2000:ordinary:0:0::/home/grios:/bin/sh mysql mysql:*:1001:1002:mojave:0:0::/home/mysql:/usr/bin/false oldap oldap:*:1002:1002:mojave:0:0::/home/oldap:/usr/bin/false qmaild qmaild:*:1008:1006:mojave:0:0::/var/qmail:/usr/bin/true qmaill qmaill:*:1009:1006:mojave:0:0::/var/qmail:/usr/bin/true qmailp qmailp:*:1010:1006:mojave:0:0::/var/qmail:/usr/bin/true qmailq qmailq:*:1011:1007:mojave:0:0::/var/qmail:/usr/bin/true qmailr qmailr:*:1012:1007:mojave:0:0::/var/qmail:/usr/bin/true qmails qmails:*:1013:1007:mojave:0:0::/var/qmail:/usr/bin/true sioux sioux:$2a$08$B8PLPgdw18I.TlnZC8RnZezg1Ed8gQL8WU/4rpxdyGdOk/PO/9Ude:1000:1000:mojave:0:0::/home/sioux:/bin/sh tinydns tinydns:*:1005:1005:mojave:0:0::/home/tinydns:/usr/bin/false lion# makedbm -u master.passwd.byuid 1000 sioux:$2a$08$B8PLPgdw18I.TlnZC8RnZezg1Ed8gQL8WU/4rpxdyGdOk/PO/9Ude:1000:1000:mojave:0:0::/home/sioux:/bin/sh 1001 mysql:*:1001:1002:mojave:0:0::/home/mysql:/usr/bin/false 1002