Hello all,
I have a Solaris 10 SPARC server that crashed a couple of weeks ago and I finally got it up the other day. I am having some problems getting my NIS automounts to work though. It appears that NIS is working, but the /home directories are not mounting and users can not log in (I can log in with root from a thin client remotely). This is my primary server that runs everything for a couple thin clients running off of it. I don't know if I really need NIS (I am new to it), but it is how the server was configured before I started working here.
I ran a few commands to check if NIS is working and got this:
# ypwhich
mdc1
which is my server, so it recognizes that NIS is working.
# ypmatch adam passwd
adam:$1$JLcVC9OC$m297M2r/u5FT4Sajcj/7t1:1047:1:Adam:/home/adam:/bin/tcsh
so it appears to know how to get my log in credentials
# ypmatch adam auto.home
mdc1:/pool/home/adam
and that is where the my home directory is physically located at. I don't know if it is worth noting, but if I do ypmatch adam auto_home it does not find a map, I have not seen any files named auto.home on my server.
Before the crash the NIS automounts would map the home directories from /pool/home/adam to /home/adam. /pool/home which is shared out with the dfstab.
This is the output of my /etc/auto_master file:
#
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)auto_master 1.8 03/04/28 SMI"
#
# Master map for automounter
#
+auto_master
/net -hosts -nosuid,nobrowse
/home auto_home -nobrowse
and my /etc/auto_home file:
#
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)auto_home 1.6 03/04/28 SMI"
#
# Home directory map for automounter
#
+auto_home
One thing I found different on this server is that the yp directory with all the auto_* files is in /export/home/opt/yp (I believe due to storage limitations). I don't know if this is my problem, just though it may be relevant in helping troubleshoot.
The contents of my /export/home/opt/yp/auto_master file:
#
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)auto_master 1.8 03/04/28 SMI"
#
# Master map for automounter
#
/net -hosts -nosuid,nobrowse
/home auto_home -nobrowse
/data auto_data
/apps auto_apps
/adm auto_adm
/- auto_direct
/ATD auto_ATD
and the contents of /export/home/opt/yp/auto_home:
#
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)auto_home 1.6 03/04/28 SMI"
#
# Home directory map for automounter
#
rt mdc1:/export/home/&
david mdc1:/pool/home/dkallus
butch mdc1:/pool/home/butch
adam mdc1:/pool/home/adam
* mdc1:/pool/home/&
When I try to manually run the /export/home/opt/yp/auto_master automount I get permission denied for all 7 automounts listed.
Everything in my /etc/dfs/dfstab and /etc/vfstab are mounting with no problems and I can manually mount directories from my storage servers (which are one of my NIS automounts that are not working) with no problem. I have read a known problem for this is that there is already a directory under /home, but this is not the case.
One thing I will mention is that the cause of my server crash was some permissions getting changed (unknown cause), which caused it to not boot into multi-user mode. So I'm wondering if it is some residual permissions issue again.
I also noticed that I can su to any user, but when I try to cd ~ it takes me to /, not the users home directory. Also, I can not su to root once I su to another user, it says "su: Unknown id: root" (I am logged in as root, so I have to exit out of the user).
Here is the contents of my /etc/nsswitch.conf file:
#
# /etc/nsswitch.nis:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.
# NIS service requires that svc:/network/nis/client:default be enabled
# and online.
# the following two lines obviate the "+" entry in /etc/passwd and /etc/group.
passwd: files nis
group: files nis
# consult /etc "files" only if nis is down.
hosts: files nis dns
# Note that IPv4 addresses are searched for in all of the ipnodes databases
# before searching the hosts databases.
ipnodes: files nis
# SUNRAY DEL networks: nis [NOTFOUND=return] files
networks: files nis [NOTFOUND=return] # SUNRAY ADD
protocols: nis [NOTFOUND=return] files
rpc: nis [NOTFOUND=return] files
ethers: nis [NOTFOUND=return] files
# SUNRAY DEL netmasks: nis [NOTFOUND=return] files
netmasks: files nis [NOTFOUND=return] # SUNRAY ADD
bootparams: nis [NOTFOUND=return] files
publickey: nis [NOTFOUND=return] files
netgroup: nis
automount: files nis
aliases: files nis
# for efficient getservbyname() avoid nis
services: files nis
printers: user files nis
auth_attr: files nis
prof_attr: files nis
project: files nis
Any thoughts or ideas?? All help is greatly appreciated!
---------- Post updated at 01:34 PM ---------- Previous update was at 11:22 AM ----------
Looks like I have the automount working now, Nothing shows up under /home until you cd into a directory. Once I went into /home/adam it created the mount under the /home directory like it is supposed to.
So now the only problem is I can only login with my account and root, but none of my users can login still, and I can't su to root when I login as myself (or su back to root after I su to one of my customers while logged in as root). My login credentials and home directory are in the same location as my users.
I am thinking it may be from my yp files being in the wrong location, how can I check the file locations that the server is checking when someone attempts to login, or where NIS is looking for the NIS files.
Any other idea's?