1834601 Members
3852 Online
110069 Solutions
New Discussion

NIS user cannot log in

 
MarkSyder
Honored Contributor

NIS user cannot log in

Hi everybody.

I've just rebuilt a workstation following a power surge. Everything looks fine until a user tries to log in over the network: error message "login incorrect".

I've looked through numerous threads to see if I can find anything similar, but nothing seems to help. Any suggestions appreciated.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
27 REPLIES 27
Sivakumar TS
Honored Contributor

Re: NIS user cannot log in


Dear

login as root (local user) and check if the connectivity is OK.

try

#ypwhich

in the client and confirm the NIS servers connectivity.

With Regards,

Siva.
Nothing is Impossible !
Devender Khatana
Honored Contributor

Re: NIS user cannot log in

Hi,

Is it the NIS user which is trying to login or you have not yet put it into NIS?

Is /etc/resolv.conf set properly to look for proper entry? and can your workstation see the NIS server?

HTH,
Devender
Impossible itself mentions "I m possible"
MarkSyder
Honored Contributor

Re: NIS user cannot log in

Thanks Siva.

Output of ypwhich is identical to a working workstation.

Mark
The triumph of evil requires only that good men do nothing
Peter Godron
Honored Contributor

Re: NIS user cannot log in

Mark,
have you tried:
1. Login with root, then su - to the user
2. check the nsswitch.conf for passwd
3. is this a trusted system?
4. Has the password aged out?
MarkSyder
Honored Contributor

Re: NIS user cannot log in

Devender:

Workstation can ping NIS server.

The only difference between resolv.conf on this workstation and a working one was that the newly rebuilt one had a comment against the NIS server. I have removed the comment in case it was causing problems. Does anything need to be restarted?

Mark
The triumph of evil requires only that good men do nothing
MarkSyder
Honored Contributor

Re: NIS user cannot log in

Peter:

1. su indicates "Unknown id".
2. nsswitch.conf has files first then NIS. Working WS is the other way round. (I would have thought files first was logical.)
3. No.
4. I reset the password in case he had forgotten it.

Mark
The triumph of evil requires only that good men do nothing
RAC_1
Honored Contributor

Re: NIS user cannot log in

Things to check.
1
nsquery passwd "nis_user" "NIS"
Does it resolve it?? If yes that means client can reach nis server and client is interacting with nis server. Again check if ypbind is running or not.
2
ypwhich -m --> Does it list password map??
3
Cross check nsswitch.conf file.
4
Password file. Do you have "+" (allowed nis user) for that user in password file-/etc/passwd
There is no substitute to HARDWORK
MarkSyder
Honored Contributor

Re: NIS user cannot log in

RAC:

"This name service is currently unavailable", yet ypbind is running.

Mark
The triumph of evil requires only that good men do nothing
MarkSyder
Honored Contributor

Re: NIS user cannot log in

Possibly another clue:

I've compared several things on the two workstations in SAM. On the "Network Services" screen I see that NFS is disabled on the faulty workstation but enabled on the working one. I've tried to enable it on the faulty ws but after a lengthy delay with an hourglass it returns to disabled.

Mark
The triumph of evil requires only that good men do nothing
Steve Steel
Honored Contributor

Re: NIS user cannot log in

Hi


What does

nsquery passwd "nis_user"

Give

nsquery hosts hostname

Would also be interesting


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
RAC_1
Honored Contributor

Re: NIS user cannot log in

nis has nothing to do with NFS. Did you checked all options I asked to check. If yes, post.
nsquery command should be as follows.

nsquery passwd "user_name" "nis"
There is no substitute to HARDWORK
MarkSyder
Honored Contributor

Re: NIS user cannot log in

RAC:

I've amended nsswitch.conf to reflect the working WS then I reran the nsquery. It now shows the user correctly but I still cannot su to his account.

Mark
The triumph of evil requires only that good men do nothing
RAC_1
Honored Contributor

Re: NIS user cannot log in

What is the error message?? also answer all previous questions.
There is no substitute to HARDWORK
MarkSyder
Honored Contributor

Re: NIS user cannot log in

Steve:

nsquery hosts hostname gives a correct entry.

Mark
The triumph of evil requires only that good men do nothing
Steven E. Protter
Exalted Contributor

Re: NIS user cannot log in

Shalom Mark,

su can be blocked by pam configuration. We use it to stop root from doing su - to certain dangerous users.

This can also be used to totally prevent user login.

file should be called #pam_user.conf
or
pam_user.conf

You might find its contents interesting.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
MarkSyder
Honored Contributor

Re: NIS user cannot log in

RAC:

Apologies - I thought I had answered your questions. Looking back at my response, I only actually answered the first one.

1. This gives a correct answer
2. Yes
3. I have amended it so it is the same as the working workstation (with the exception of passwd - the working one has NIS first, the faulty one has /etc/passwd then NIS which is, in my opinion, more logical)
4. Yes.

SEP:

Thanks. I've checked the file and compared it with the working WS. It's identical.

Mark
The triumph of evil requires only that good men do nothing
RAC_1
Honored Contributor

Re: NIS user cannot log in

Post nsswitch.conf
/sbin/init.d/nis.client stop and start
There is no substitute to HARDWORK
MarkSyder
Honored Contributor

Re: NIS user cannot log in

RAC - nsswitch.conf as requested:

hosts: dns [NOTFOUND=continue] nis [NOTFOUND=continue] files
automount: nis [NOTFOUND=return UNAVAIL=continue] files
passwd: files [NOTFOUND=return UNAVAIL=continue] nis
group: files [NOTFOUND=continue UNAVAIL=continue] nis
services: nis [NOTFOUND=continue] files

Mark
The triumph of evil requires only that good men do nothing
RAC_1
Honored Contributor

Re: NIS user cannot log in

passwd: files [NOTFOUND=return UNAVAIL=continue] nis

this should be
passwd: files [NOTFOUND=continue UNAVAIL=continue] nis

or simply,

passwd: files nis
There is no substitute to HARDWORK
Steve Steel
Honored Contributor

Re: NIS user cannot log in

Hi

Is this box or has this box ever been trusted

Are either of these there

/tcb/files/auth/system/default

If there and 15 or more bytes long system is assumed trusted

/etc/shadow.

If its there it maybe should not be

rename existing file so you lose nothing and try again

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
MarkSyder
Honored Contributor

Re: NIS user cannot log in

Thanks RAC - so obvious when it's pointed out.

I can now su to the user and I can telnet in as him from a different WS, but when he tries to log in at the console using CDE he still gets "Login incorrect".

Further help appreciated.

Mark
The triumph of evil requires only that good men do nothing
Simon Wickham_6
Regular Advisor

Re: NIS user cannot log in

Have you added +:: at the end of /etc/passwd file?

Other wise try to stop/start pwgrd to rule this out.

# /sbin/init.d/pwgr stop
# /sbin/init.d/pwgr start

Regards,
Simon
MarkSyder
Honored Contributor

Re: NIS user cannot log in

Thanks Simon.

No different after trying that.

I'm currently rebooting the workstation to see if that brings it back. Meanwhile, more suggestions would be welcome (if the forum is available long enough to allow people to post!).

Mark
The triumph of evil requires only that good men do nothing
john korterman
Honored Contributor

Re: NIS user cannot log in

Hi Mark,

does the pw of the user hold any character that may collide with the tty settings?
- compare with the output of "stty -a"

regards,
John K.
it would be nice if you always got a second chance