Add NIS Client Support to ReadyNAS

Posted by Kaya Kupferschmidt • Saturday, February 21. 2009 • Category: Hardware

This guide is about how to setup probably any ReadyNAS device to act as a NIS/YP client. NIS/YP is a protocol that shares account information accross the network. In such an environment it is important that the ReadyNAS knows about all Linux and Windows account, so it can keep access rights on files in sync. If users had different numerical IDs on Linux clients and on the ReadyNAS, all files created from these clients wouldn't beb accessible on Windows machines any more, because the ReadyNAS wouldn't know which account the files belong to.

On Windows there is already a powerful solution, called Active Directory. This is already supported on the ReadyNAS, but there is no support for the corresponding UNIX protocol, which is NIS. Having a central account authority which manages both Windows and Linux accounts via Active Directory and NIS is very helpful in such mixed environments.

Background: I am working in a mixed environment with Windows, Linux and Mac OS machines. I use SMB/CIFS for Windows and NFS for both Linux and Mac OS. I am running a NIS server on a small Linux PC, but until today I had to duplicate all accounts on the ReadyNAS in order to assign correct IDs to files. I wanted to use the Linux PC also as a PDC (Primary Domain Controller) for Windows, but then this would be only half the solution. To my surprise, all software needed to run a NIS client is already installed both on the ReadyNAS NV and on the ReadyNAS Pro. So the only thing to do is to configure the service.

This guide only handles the client side aspects, you still have to run a NIS server in your network. I assume that you are familar with Linux and are able to use vi in order to edit the files. Otherwise you probably won't need NIS anyway.

  1. Enable root-ssh access via Add-On.
  2. Log in as root into the machine.
  3. Edit the file /etc/defaultdomain and enter your NIS domain here. Initially it should be empty, simply enter the NIS domain name.
  4. Open /etc/passwd and add the famous NIS line at the end: +::::::
  5. Open /etc/group and do the same, add the following line at the end: +:::
  6. run /etc/init.d/nis start You should see that you just joined the NIS domain.

Ok, but there is one thing missing. The NIS client service won't start when the machine is rebootet. So we have to add some links to the runlevel definition directorys: ln -s /etc/init.d/nis /etc/rc0.d/K19nis ln -s /etc/init.d/nis /etc/rc1.d/K19nis ln -s /etc/init.d/nis /etc/rc2.d/S19nis ln -s /etc/init.d/nis /etc/rc3.d/S19nis ln -s /etc/init.d/nis /etc/rc4.d/S19nis ln -s /etc/init.d/nis /etc/rc5.d/S19nis ln -s /etc/init.d/nis /etc/rc6.d/K19nis

I currently run my ReadyNAS using NIS and ActiveDirectory, and it works like a charm! It would be really great if NIS could be included into Frontview, then we wouldn't have to fiddle around with these things.


Display comments as (Linear | Threaded)
  1. No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Markdown format allowed