1845705 Members
2775 Online
110247 Solutions
New Discussion

NIS NFS

 
SOLVED
Go to solution
LV2DIVE
Frequent Advisor

NIS NFS

I have a couple of users that cannot start a CAD application from a NFS directory that everyone else can, until I did the following to these users:

1. Renamed the hostname of the machine and gave it a new IP address.
2. Gave the user a new name (but kept his UID the same) in /etc/password and changed it in /etc/group to reflect the passwd file.
29 REPLIES 29
V. Nyga
Honored Contributor

Re: NIS NFS

Hi,

have you tried to push the NIS maps again (/var/yp/ypmake) ?

Can you tell us more about hardware (server, clients) software/application?

Volkmar
*** Say 'Thanks' with Kudos ***
A. Clay Stephenson
Acclaimed Contributor

Re: NIS NFS

It sounds as though you were fixing the symptoms rather than addressing the problem. I would guess that you have a problem with the hosts and passwd maps (and possibly the automounter maps).
If it ain't broke, I can fix that.
LV2DIVE
Frequent Advisor

Re: NIS NFS

Location never had a slave, so I added the HP as a slave for now.(Will probably make it the MASTER in the future)

Master: SUN Orgin 300 - IRIX 6.5
Slave: HP C8000 - HP-UX 11.11

Clients are:
HP c8000
HP c3750
IBX p275
SGI Octane2

Applications are CATIA v4/v5, UG, and Ideas.

No Automounting. Only using NIS for passwd and groups.

V. Nyga
Honored Contributor

Re: NIS NFS

So you've declared the NIS domain?
Have you pushed the maps?
You have to find the SUN-specific command for ypmake.

V.
*** Say 'Thanks' with Kudos ***
A. Clay Stephenson
Acclaimed Contributor

Re: NIS NFS

In that case, I would run "ypcat hosts" and "ypcat passwd" from the troublesome clients and compare that output to a "good" client's.
If it ain't broke, I can fix that.
V. Nyga
Honored Contributor

Re: NIS NFS

... and
'ypwhich' at the client

V.
*** Say 'Thanks' with Kudos ***
LV2DIVE
Frequent Advisor

Re: NIS NFS

When I run:

ypcat passwd -or- ypcat group

It looks fine. When I try to start the application from the NFS directory it seems to hang up.

Some clients see the HP and others see the SGI. What makes no sense to me is that after changing the machine's ip address and the users alias for their UID it worked.

Can NIS mess with the NFS lock files?
V. Nyga
Honored Contributor

Re: NIS NFS

Hi,

does a 'ls -l' works for the application directory?
Are there log files written to the directory?

V.
*** Say 'Thanks' with Kudos ***
A. Clay Stephenson
Acclaimed Contributor

Re: NIS NFS

No. When you said that you changed the hostname and the password and group entries, where did you make those changes? On the clients? On the NIS master?

Which particular clients had the problems? One thing to try is killing the pwgrd daemons on the clients (you don't really need it anyway).
If it ain't broke, I can fix that.
LV2DIVE
Frequent Advisor

Re: NIS NFS

V.,
ls -l works in all of the directories.
No log files that I can see.

A.Clay,
Clients only have the bare hosts, passwd and group file.

Only MASTER and SERVER have complete hosts, passwd and group.

So far only the HPs have had this problem.


V. Nyga
Honored Contributor

Re: NIS NFS

Hi again,

have you added a '+' at the end of passwd, group and hosts?

V.
*** Say 'Thanks' with Kudos ***
LV2DIVE
Frequent Advisor

Re: NIS NFS

Yes on the MASTER and SLAVE servers and +::-2:-2::: on the clients.
Peter Nikitka
Honored Contributor

Re: NIS NFS

Hi,

could you please check/send
/etc/nsswitch.conf
for the order of the name resolution?
Espec. hosts, passwd and group are of interest.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
LV2DIVE
Frequent Advisor

Re: NIS NFS

Servers are:
hosts: files nis

Clients are:
hosts: files nis
A. Clay Stephenson
Acclaimed Contributor

Re: NIS NFS

On the bad HP clients, is the '+' entry the last entry in the passwd and group files. Did you try killing the pwgrd daemons on these clients? Stale pwgrd entries can cause you king of problem. On your NFS servers, do you have access= defined in the exports files and are these hots included?
If it ain't broke, I can fix that.
V. Nyga
Honored Contributor

Re: NIS NFS

Hi again,

sorry, from my experience the master server doesn't need a '+' at the end.
Am I wrong?
Or can you test it without the '+'.

Volkmar
*** Say 'Thanks' with Kudos ***
Peter Nikitka
Honored Contributor

Re: NIS NFS

Hi,

the '+' is effective only in compatibility mode.
Please send out of /etc/nsswitch.conf the entries for
passwd:
group:

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
LV2DIVE
Frequent Advisor

Re: NIS NFS

MASTER SERVERS /etc/nsswitch.conf
automount(dynamic): nis (nis_enumerate_key)
#bootparams: files nis
capability: files nis
clearance: files nis
ethers: files nis
group: files nis
hosts: files nis dns
mac: files nis
mail(null_extend_key): ndbm(file=/etc/aliases) nis
netgroup: nis
#netid.byname: nis
networks: files nis
passwd: files(compat) [notfound=return] nis
protocols: nis [success=return] files
rpc: files nis
services: files nis
shadow(mode=0700): files

SLAVE SERVERS /etc/nsswitch.conf
passwd: files nis
group: files nis
hosts: files nis
networks: files nis
protocols: files nis
rpc: files nis
publickey: files nis
netgroup: files nis
automount: files
aliases: files
services: files

CLIENTS /etc/nsswitch.conf
passwd: files nis
group: files nis
hosts: files nis
networks: files nis
protocols: files nis
rpc: files nis
publickey: files nis
netgroup: files nis
automount: files nis
aliases: files nis
services: files nis
Peter Nikitka
Honored Contributor

Re: NIS NFS

Hi,

you have to decide, wether using compatibility mode or not; an entry
passwd: files(compat) [notfound=return] nis

is NOT valid, IMHO.
Either use (which I recommend)
passwd: files nis
or
passwd: files(compat)

The simple 'files nis' order will not require any modifications of local files /etc/passwd and lookup non-local entries in the NIS map automatically.
A 'compat' entry is required ONLY for merging NIS data with local ones out of /etc/passwd like
+user:::::/bin/false
But than an additional nis lookup, configured via /etc/nsswitch.conf make no sense (at least: or creating trouble).

mfG Peter

The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
LV2DIVE
Frequent Advisor

Re: NIS NFS

Peter,

I changed the NIS MASTER SERVER's /etc/nsswitch.conf to look like the SLAVE server by only using (file nis) and rebooted them both (Master then Slave) this morning.

I have just noticed that from the SLAVE it has trouble resolving the hostname when I try to rlogin to a client by IP address of coarse works fine.

If I ypcat hosts, it replies the hosts list from the MASTER correctly.
If I ping it resolves fine, but if I telnet or rlogin to a hostname it hangs for a minute and will eventually login after a minute or so.

Any ideas?
Peter Nikitka
Honored Contributor

Re: NIS NFS

Hi,

though I think it had been much 'time for points' yet ...
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
...

- What is the output on a SLAVE of the command
nslookup hostname

- What do you mean by 'the ping resolves fine'?
Did the ping get an IP address or a hostname?
Resolving of names does not differ between ping, telnet, rlogin ...

- Is there a difference when you login via telnet as a user with a local HOME directory or a NFS mounted HOME?

- Are NFS mounts performed via automount a as static entries in /etc/mnttab?

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
LV2DIVE
Frequent Advisor

Re: NIS NFS

<- What is the output on a SLAVE of the
# nslookup hp35
Using /etc/hosts on: cadsvr

looking up FILES
Name: hp35
Address: 10.51.34.197
Aliases: shaunm

<- What do you mean by 'the ping resolves
Ping resolves the ip address from the name.
# ping hp35
PING hp35: 64 byte packets
64 bytes from 10.51.34.197: icmp_seq=0. time=0. ms


See above...


May not, but in this senario ping resolves fast while telnet and rlogin are slow.

<- Is there a difference when you login via
I am on the NIS SLAVE which is also the SAN/NFS server. All directories are local to it. If I go to a client it has no problem with rlogin, telnet and ping.

<- Are NFS mounts performed via automount a
All mounts are via static entries in the /etc/fstab for the clients and the server are mounts to the SAN drives.
Peter Nikitka
Honored Contributor

Re: NIS NFS

Hi,

1) You see the hostname resolutions is successful done form /etc/hosts - no access to a NIS map is done.

2) If you say 'telnet/rlogin is slow':
You may count only the time until

telnet otherhost

presents its login-prompt. Does the login process take so much time or the presentation of the login prompt?

3) Local/Remote dirs:
Are there disks mounted on the host NOT belonging to the SAN? Maybe the OS disk(s)?
If the root login has still '/' as HOME, is the root login slow as well?


mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
LV2DIVE
Frequent Advisor

Re: NIS NFS

Hello,

<1) You see the hostname resolutions is
Here is a different host that I added only to the MASTER NIS Server.

# nslookup eric
Using /etc/hosts on: cadsvr

looking up FILES
Trying NIS
Name: eric
Address: 10.51.34.13


<2) If you say 'telnet/rlogin is slow':



When I type rlogin or telnet, nothing happens until 35-45 seconds later, then it presents the prompt. After that it is fine.

3) Local/Remote dirs:
Are there disks mounted on the host NOT belonging to the SAN? Maybe the OS disk(s)?
If the root login has still '/' as HOME, is the root login slow as well?

If I am logged in as root on / or as another user on a different disk it still takes 35-45 seconds to get the login prompt.

If I login into a client or the MASTER NIS server it is fine logging into this SLAVE server or other machines.