Wednesday, March 21, 2012

NIS

Well, we exported /home for one simple reason, we want to assure every user can access his account on any client, for doing this we have 2 options: NIS or LDAP.
The best option is LDAP but at this moment I don't have time to spare in stuff that I don't really know, so NIS is the choice.

Status of the LAN... a computer is not mounting the nfs... wat?
By mistake I checked /etc/network/interfaces and I found this config:

auto eth0
iface eth0 inet dhcp

The previous sysadmin worked with dynamic ips!, he/she must've been a warlock or something.
 I don't really find useful to work that way so I put them static.

Now, the diagnosis: we have to check the files:
  • /etc/defaultdomain    Same name in server and clients
  • /etc/default/nis    NISSERVER=master and NISCLIENT=false in server, NISSERVER=false and NISCLIENT=true in every client
  • /etc/yp.conf   ypserver 127.0.0.1 in server and ypserver server_ip in clients
  • /etc/nsswitch shared passwd group and shadow in server and client
Everything seemed ok but it wasn't working, so by searching a little around I found that network-manager and nis have some conflicts, I don't know if the problem continues right now because this server is running lenny with a kernel 2.6 (the granpa packages) so I just remove network-manager (I don't need it anyway) and restarted portmap and nis... nope not working.

It turns out that /etc/ypserv.securenets (the file that grants access to clients to the nis server) was with a wrong config, it was giving rights to access to a strange range of ips.

Fixed this, we have nis working :)

No comments:

Post a Comment