Operating System - HP-UX
1827296 Members
1913 Online
109960 Solutions
New Discussion

NIS user id resolution not working

 
Norman Dignard
Regular Advisor

NIS user id resolution not working

NIS server setup to use a nis.passwd file.
Having both local and nis accounts allows using the same UID for local and nis users.

The local passwd file has an entry "+username"
that is to allow him to login onto the server.

The nis user has a login dir & files but the UID of those files resolves to the local account UID not the nis account id.

nsswitch.conf file is setup for passwd: compat

How can I get the UIDs to resolve to the proper owners?

For example
- local passwd has user "ids" as UID 101
- nis.passwd has user "jdoe" as UID 101

Files owned by jdoe showup as owned by ids.

Norm Dignard
5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: NIS user id resolution not working

You really should synchronize your userids so that they are the same both locally and within your NIS setup. I can only foresee more problems with unsynchronized user ids in your setup.
Norman Dignard
Regular Advisor

Re: NIS user id resolution not working

Just to clarify - on HPUX 11i when using NIS with a nis password file, SAM creates 2 user icons - Local and NIS users. Adding a user to either one of these groups via SAM creates/uses the next available UID in the applicable passwd file. SAM does not do any syncing between these 2 groups. Hense the situation.
Tom Maloy
Respected Contributor

Re: NIS user id resolution not working

This is operating as designed. A conflict has been set up between local and NIS users, and the has to be corrected. Ownership is local, so "ids" will own the files.

In general, it is easier to change a local UID than an NIS UID, because the scope is much more limited.

If a user is in NIS, that UID should not be used for any other user on any other machine.

Tom
Carpe diem!
Mike Hassell
Respected Contributor

Re: NIS user id resolution not working

Norm,

When you first run SAM to create a NIS user it should ask you for a passwd file and a make procedure (make or ypmake). Check your:

/var/sam/preferences/app_preference

Tom and Patrick are correct, that you should sync these two files or use a single passwd file to fix your problem with UIDs.

Hope that helps.

-Mike
The network is the computer, yeah I stole it from Sun, so what?
S.K. Chan
Honored Contributor

Re: NIS user id resolution not working

That's the point Patrick is trying to say. By having unique UIDs be it NIS accounts or local accounts you would not see this problem. The local entries in /etc/passwd will override any key value in the NIS map. That is why any files at all with UID 101 on this machine will be owned by "ids" not "jdoe". The nsswitch.conf file in your case is setup correctly ie "compat" because you want to enforce the "+/-" syntax in the passwd and group files. Even if you change the search order in nsswitch.conf (say you don't want to put compat), "files" has to come first which simply proves that local entries has precedence in the UID resolution.