![]() |
Notes: YP / NIS on 12.1
A recent ftp_server threat accellerated my upgrade from Slackware 11.0 to Slackware 12.1. The first problem was that the eth0 and eth1 cards got swapped by udev, which caused me to spend some time trying to figure out why my ISP would not respond to dhcp client requests on my LAN.
The second problem was that while NIS worked fine under 11.0, it did not work under 12.1. I've spent a week googling, reading man pages, tangential forum posts, and lots of unanswered posts by similarily aflicted people. The Slackware NIS mini howto was my starting guide. What I ended up doing was similar EXECPT: -The Slackware rc.yp script didn't work, out of the box, for the server. Here's how I got it to work...which may not be exactly right, but it appears to work: 1. set nisdomainname 2. verify that securenets has 255.255.255.0 for 127.0.0.1 (localhost) 3. start ypbind [noone's instructions called for the server to start ypbind] 4. run the rc.yp script: sh /etc/rc.d/rc.yp 5. run ypinit: /usr/lib/yp/ypinit -m <do the dialog verifyiing your server> At this point, the clients recognize the server. Hope this helps the next guy, so that he doesn't have to spend 25 or 30 hours researching, and perhaps ultimately just brute force experimenting, to get things working. Doing so creates such a feeling of ineptitude. Finally, if someone can provide better guidance, please do. I am unconvinced that I understand the reasons why NIS behances the way it does. I thought there was something not working right with portmapper, iptables and stuff like that, preventing the clients from contacting the server. |
Hello, have your read the /etc/rc.d/rc.yp script ?
All commands are commented! It sure can't work as this! If you take a little time to read the script, it seems that the NIS server and client configuration is explained in the script comments |
I absolutely read the script, and found that it didn't work for me with 12.1. That's why I made the post I made.
The script for 11.0 is essentially identical, and yp /nis worked there without any hitches. My posting outlines the deviations from rc.yp, which included adding ypbind and ypinit -m. |
This is the way I configured NIS on my local network:
First of all, you can choose to use the /etc/yp.conf to configure the address of your NIS server, or you can use the default broadcast method. Using broadcast won't work if you have a router, nat or firewall separating different computers. Second, you need to choose a name for your NIS-domain. This does not have to be (and actually should not be for security reasons) your DNS domain. A - On your server: 1) Edit /etc/yp.conf with this line: Code:
domain <NAME_OF_YOUR_NISDOMAIN> server 127.0.0.1Code:
passwd: files nisCode:
255.255.255.0 192.168.1.0Code:
# domainname <NAME_OF_YOUR_NISDOMAIN>Code:
MERGE_PASSWD=falseCode:
... (set nisdomain:)Code:
# chmod +x /etc/rc.d/rc.ypCode:
# chmod +x /etc/rc.d/rc.rpcCode:
# /etc/rc.d/rc.rpc startCode:
make -c /var/ypCode:
# rpcinfo -u localhost ypbind12) Everytime you add a new user or group, rebuild the yp databases with "make -c /var/yp". You can add this line to the end of the useradd script etc. B - On your clients: 1) If you cannot use broadcast, edit /etc/yp.conf with this line: Code:
domain <NAME_OF_YOUR_NISDOMAIN> server <IP_ADDRESS_OF_YOUR_NISSERVER>Code:
passwd: files nisCode:
# domainname <NAME_OF_YOUR_NISDOMAIN>Code:
... (set nisdomain:)5) Make /etc/rc.d/rc.yp executable if it is not already: Code:
# chmod +x /etc/rc.d/rc.ypCode:
# chmod +x /etc/rc.d/rc.rpcCode:
# /etc/rc.d/rc.rpc startCode:
# echo +:::::: >> /etc/passwd (6x :)9) Check if ypbind is listening to clients: Code:
# rpcinfo -u localhost ypbind10) Test if your NIS client is communicating with your NIS server: Code:
# ypcat passwdC - More information: Check out http://tldp.org/HOWTO/NIS-HOWTO/index.html Happy Slacking! |
| All times are GMT -5. The time now is 06:45 AM. |