I have setup a nis server and client. At first I didn’t have a local user defined on the client. The client then used the user and passwords from NIS, so that was ok.
The problem then is, that when the server is down, I couldn’t login to my client anymore. So I created a local user with the same name on the client but with a different password (after I shut the nis server down, if nis server was on, I couldn’t create a local user with the same name). I then edited /etc/nssswitch.conf as follows:
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# compat Use compatibility setup
# nisplus Use NIS+ (NIS version 3)
# nis Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# [NOTFOUND=return] Stop searching if not found so far
#
# For more information, please read the nsswitch.conf.5 manual page.
#
# passwd: files nis
# shadow: files nis
# group: files nis
passwd: nis files
group: nis files
hosts: nis files mdns4_minimal [NOTFOUND=return] dns
networks: files dns
services: files nis
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files nis
publickey: files
bootparams: files
automount: files
aliases: nis files
shadow: compat
At the line passwd I specified first nis and than files. I thought the behaviour would be like this:
If NIS server is on: client has to login with the nis password
If NIS server is down: client has to login with the local password (as fallback)
However the actual behaviour is that I can only login with the local password now. The NIS pasword doesn’t seem to be used anymore. What can I do to fix this?