Operating System - HP-UX
1826343 Members
4350 Online
109692 Solutions
New Discussion

Re: NIS password update problem

 
SOLVED
Go to solution
Jay Kianos
Occasional Contributor

NIS password update problem

I'm having a problem setting user passwords on my NIS master. Whenever I do

passwd

it comes back and asks me for the Old NIS Password. As root on the master, it should let me do this without asking for the old password. This has worked correctly for a long time and just started to act up.

Any ideas would be greatly appreciated. The NIS server is running HPUX 10.20.
6 REPLIES 6
Shannon Petry
Honored Contributor

Re: NIS password update problem

This is because your path is not properly setup.

echo $PATH should show that /bin is before /usr/bin with the root user.

If the path was setup properly, root would run the binary /bin/passwd and no old NIS password would be required.

root is obviously running /usr/bin/passwd which will call yppasswd on detection of NIS.

To test this, try the following:

as root

/bin/passwd

/usr/bin/passwd

/usr/bin/yppasswd

If you need to keep your path setup with /usr/bin ahead of /bin, then use the absolute path of the passwd program root should be using when changing users passwords.
E.G.
/bin/passwd

Regards,
Shannon
Microsoft. When do you want a virus today?
Jay Kianos
Occasional Contributor

Re: NIS password update problem

No luck on using /bin/passwd either. It still asks for the old NIS passwd.
Shannon Petry
Honored Contributor
Solution

Re: NIS password update problem

My bad, in haste I wrote /bin for root instead of /sbin.


root's path should have /sbin first.

run /sbin/passwd and your problem will go away.

Sorry for the oops!
Regards,
Shannon
Microsoft. When do you want a virus today?
Jay Kianos
Occasional Contributor

Re: NIS password update problem

Nope - no luck with /sbin/passwd either, still asking for Old NIS password.
Shannon Petry
Honored Contributor

Re: NIS password update problem

Check the sizes then of /sbin/passwd and /bin/passwd. They should be very different.

ll /sbin/passwd
-r-sr-xr-x 1 root bin 229376 Nov 7 1997 /sbin/passwd

ll /usr/bin/passwd
-r-sr-xr-x 5 root bin 49152 Apr 9 1998 /usr/bin/passwd

The size of /bin/passwd should match the one in /usr/bin.

/sbin/passwd is a statically compiled program, hence much larger.

Permissions as root should not matter.

I wonder if someone tampered with your system?

Regards,
Shannon
Microsoft. When do you want a virus today?
Jack Magilsen
Advisor

Re: NIS password update problem

This helped me out ..please assign more points :)
It's not how fast your are, just keep moving..