Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding NIS client on Solaris 5.8

Status
Not open for further replies.

Job317

Programmer
Aug 15, 2007
37
US
Hi group,

Please don't flame me. I am having trouble getting my Solaris 5.8 machine to find an NIS server which we have moved on our network.

On Linux, I simply changed the NIS client configuration to use the broadcast method of finding the NIS server but I am unclear on how/where to do the same thing on a Solaris 5.8 machine. I would rather use broadcast on the Solaris machine in case we need to move the NIS server in the future to prevent going through this exercise in the future.

Any hints? Readmes would work too.

Thanks.
 
Make sure your NIS servers IP address is correct in your /etc/inet/hosts file. Ping your NIS server (by nodename and IP Address) to verify it can be seen by the client.

If this is a new NIS server, you can create a client to that server by using command ypinit -c and responding to the messages.

Just for added information, starting with Solaris 8, NIS servers do not have to be on the same subnet as the clients.
 
Hmm. Well this is the problem I have encountered with this system before. I added the IP address and host name of the NIS server into the Solaris client's /etc/inet/hosts file then did the ypinit -c thing. I pinged the NIS server both by IP and by host name successfully.

When I rebooted the client, I get:

Code:
NIS comainname is <domain.com>
starting rpc services: rpcbind keyserv ypbind done.
WARNING: Timed out waiting for NIS to come up

And the system just hangs here. :(
 
On the client, make sure you copy /etc/nsswitch.nis to /etc/nsswitch.conf
Make sure daemon ypserv is running on the NIS server.
Make sure the domain on the server and client are the same.
 
OK Got it to work. Thanks for your help. The fix was a combination of your answer and one more small detail: when doing the "ypinit -c", I was using straight IP addresses for the NIS server names. Once I changed this to the host names and restarted everything, it all worked fine.

Except for one more thing...

When I log in as a NIS user, the user has no home directory and defaults to "/". I have googled this and seen several answers but none seem to work on Solaris. Specifically, I am unable to add home folders to the /home directory on Solaris. (I am curious why Solaris would do this as most Unices put home folders in /home).

Do you know how to configure to allow home folders for NIX logins?
 
Job317,
By default /home is a directory used for automount. I create home directories on my NIS server in a directory called /export/home. On my NIS server, I add an entry to the file /etc/auto_home with the paths to the home directory. Example: bfitzmai server:/export/home/bfitzmai. In the file /etc/passwd, I set the -d (home directory) option to /home/bfitzmai. NIS pushes these files to the client. When the user logs in on the NIS client, the users home directory is placed in directory /home/<username>.

On the NIS client, the file /etc/auto_home should only have the entry +auto_home. This tells the client to use NIS as the source.
 
OK. Whew. The solution was to add a user entry in the /etc/auto_home file on the NIS client.

Is it me or is Solaris just more difficult that other Unixes? It seems that setting up just one new feature on Solaris involves touching so many files all over the place.

Thanks. This thread is complete.
 
I have worked with with Linux, LynxOS and SunOS. The initial setups are basically the same. But, once you have the basic structure, administration is fairly easy. With Solaris 8 and 9, admintool is still available to create users. This GUI has a checkbox that will populate the NIS /etc/auto_home file. It will also add entries in passwd and group and create the users home directory automatically.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top