System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with /var/yp/src/passwd nis login fails

Sunny Jaisinghani
Trusted Contributor

Problem with /var/yp/src/passwd nis login fails

Hello All,

I have a problem with NIS login

i am not able to login using a normal nis user account on the nis master and any of the nis clients.

I am logged in as root
Following are the tests that i have done

On nis server

ypmatch nis_user passwd
ypmatch: can't match nis_user.
Reason: no such key in map

ypcat passwd | grep nis_user #does not give any output

ypcat passwd #shows me the local passwd file on nis server

Following processes are running on nis server

root 776 1 0 Nov 8 ? 36:17 /usr/lib/netsvc/yp/ypserv
root 809 1 0 Nov 8 ? 0:00 /usr/lib/netsvc/yp/ypbind
root 787 1 0 Nov 8 ? 0:00 /usr/lib/netsvc/yp/rpc.yppasswdd /etc/passwd -m passwd PWFILE=/
root 782 1 0 Nov 8 ? 0:00 /usr/sbin/ypxfrd
root 792 1 0 Nov 8 ? 0:00 /usr/lib/netsvc/yp/rpc.ypupdated

The NIS server has HPUX 11.11

The timestamp on /var/yp/src/passwd shows me Dec 9. I remember when i had created the last user account. I checked this passwd file and i find that user entry to be last.

Seems that someone has edited the /var/yp/src/passwd file manually. I am not sure. PLease also suggest how to check the consistency of /var/yp/src/passwd

Thanks

Sunny
6 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Problem with /var/yp/src/passwd nis login fails

>Please also suggest how to check the consistency of /var/yp/src/passwd

I suppose you could try: pwck /var/yp/src/passwd
Sunny Jaisinghani
Trusted Contributor

Re: Problem with /var/yp/src/passwd nis login fails

Why is "ypcat passwd" giving me the output of local /etc/passwd
Dennis Handly
Acclaimed Contributor

Re: Problem with /var/yp/src/passwd nis login fails

>Why is "ypcat passwd" giving me the output of local /etc/passwd

Does the machine know you are a NIS client?
Sunny Jaisinghani
Trusted Contributor

Re: Problem with /var/yp/src/passwd nis login fails

I did not understand your question

when i execute "ypwhich -m" on NIS master server and NIS client i get a perfect output.

The NIS server is also a NIS client

It is configured that way

Sunny
Sunny Jaisinghani
Trusted Contributor

Re: Problem with /var/yp/src/passwd nis login fails

Hello,

I have a backup of file /var/yp/src/passwd

the difference between the old and new file is

A user was deleted. manually or using a script i am not sure.

This problem has arised after that.

Sunny Jaisinghani
Trusted Contributor

Re: Problem with /var/yp/src/passwd nis login fails

I restored the old NIS passwd file.

Recreated the maps and pushed to all NIS clients.

NIS authentication works now.