LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-16-2010, 04:03 PM   #1
techterling
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Rep: Reputation: 0
Unhappy NIS Authentication Issue


I am looking for some help with a NIS issue i am having.

I have a Scientific Linux master NIS server and 27 SL clients. My system was running perfectly. I am pretty sure it is just my useraccount, but am not 100% sure. If i change my NIS password on the master with yppasswd it changes it successfully and i can use it to log in to the server. But when i try on my clients my login password is my original password when i first ever created my account. but then if i do a sudo while logged in it uses my most recent password.

I have tried it with another user account and it seems to sync uname and pass ok. but for my uname it isn't.

I have tried ypmatch and getent tests and all things come back fine.. This happens on all of my workstations connected to the master.

Very confused.

I hope someone can she a light on my issue. Feel free to ask me any questions about my config.

Thanks,
Todd
Sys Admin
 
Old 08-16-2010, 10:08 PM   #2
cjcox
Member
 
Registered: Jun 2004
Posts: 307

Rep: Reputation: 42
Some machines run a local caching daemon like nscd for ids. You'll need to kill that on your clients if you want NIS password changes to be seen immediately.
 
Old 08-17-2010, 09:39 AM   #3
techterling
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
I checked both my server and my clients and nscd is not running.

I even tried removing my account and recreating it with the same uid and a different one. and i still can use my old old password.

Uggh So Frustrating!

Thanks,
-T
 
Old 08-17-2010, 09:58 AM   #4
stuart_cherrington
Member
 
Registered: Aug 2008
Location: Get back in your Cube Unix Boy!
Distribution: rh5, oel5, debian etch, solaris
Posts: 228

Rep: Reputation: 36
do you perhaps have a local account in /etc/passwd and /etc/nsswitch.conf is looking at 'files nis'?
 
Old 08-17-2010, 10:37 AM   #5
techterling
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Another update, it appears to only be SSH that is having the issue. i can log in to a client using Xwindows login screen....

-T
 
Old 08-17-2010, 10:40 AM   #6
stuart_cherrington
Member
 
Registered: Aug 2008
Location: Get back in your Cube Unix Boy!
Distribution: rh5, oel5, debian etch, solaris
Posts: 228

Rep: Reputation: 36
Been w hile since I did NIS stuff but after you change your passwd on the master, can you examine your YP credentials from the slave to see if it has cached the change yet?
 
Old 08-17-2010, 10:47 AM   #7
techterling
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Stuart:

I looked in my /etc/password and i do not have a local account.

I looked in my nsswitch and passwd, shadow and group are all "files nis"
 
Old 08-17-2010, 10:59 AM   #8
techterling
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Ok i did a ypmatch todd passwd and got an listing of my creds.

Then went on server, changed password, even ran make in /var/yp to make sure it is pushed and it was.

Went back on client and did same ypmatch and the password string is definately different.

Still can not use my new password for SSH login....

XDMCP and console login works. but not ssh.

:-(
 
Old 08-17-2010, 11:00 AM   #9
stuart_cherrington
Member
 
Registered: Aug 2008
Location: Get back in your Cube Unix Boy!
Distribution: rh5, oel5, debian etch, solaris
Posts: 228

Rep: Reputation: 36
OK - so this looks to be nothing to do with NIS but more SSH, can you do an ssh with '-v -v' flags and post the output please.
 
Old 08-17-2010, 11:10 AM   #10
techterling
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
[todd@cs ~]$ ssh -v -v todd@boole
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to boole [166.66.64.60] port 22.
debug1: Connection established.
debug1: identity file /home/staff/todd/.ssh/identity type -1
debug1: identity file /home/staff/todd/.ssh/id_rsa type -1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/staff/todd/.ssh/id_dsa type 2
debug1: loaded 3 keys
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.3p2
debug1: match: OpenSSH_4.3p2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 119/256
debug2: bits set: 529/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug2: no key of type 0 for host boole
debug2: no key of type 2 for host boole
The authenticity of host 'boole (166.66.64.60)' can't be established.
RSA key fingerprint is 8a:08:e5:18:a5:19:14:51:1d:45:df:e9:97:2f:3a:09.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'boole,166.66.64.60' (RSA) to the list of known hosts.
debug2: bits set: 504/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/staff/todd/.ssh/identity ((nil))
debug2: key: /home/staff/todd/.ssh/id_rsa ((nil))
debug2: key: /home/staff/todd/.ssh/id_dsa (0x8508900)
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/staff/todd/.ssh/identity
debug1: Trying private key: /home/staff/todd/.ssh/id_rsa
debug1: Offering public key: /home/staff/todd/.ssh/id_dsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
todd@boole's password:
debug2: we sent a password packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
Permission denied, please try again.
 
Old 08-17-2010, 11:26 AM   #11
stuart_cherrington
Member
 
Registered: Aug 2008
Location: Get back in your Cube Unix Boy!
Distribution: rh5, oel5, debian etch, solaris
Posts: 228

Rep: Reputation: 36
OK - go onto boole (Hope you have root privs).

Login as root, su - todd.
check you have a $HOME directory, you own it and have write perms into it.
check the $HOME/.ssh is owned/grped for the user todd and the directory is 700.
 
Old 08-17-2010, 11:32 AM   #12
techterling
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
HOME=/home/staff/todd

drwxr-xr-x 72 todd staff 12288 Aug 17 12:26 todd

drwx------ 2 todd staff 4096 Aug 17 12:27 .ssh

Sufficient?

THANKS FOR YOUR TIME AND HELP!!
-T
 
Old 08-17-2010, 11:40 AM   #13
stuart_cherrington
Member
 
Registered: Aug 2008
Location: Get back in your Cube Unix Boy!
Distribution: rh5, oel5, debian etch, solaris
Posts: 228

Rep: Reputation: 36
SOrry should have asked, can you provide long listing of .ssh directory as well. The output you gave from ssh suggests a id_dsa exchange is attempted but failed.

Perhaps you could put the content of id_dsa.pub into the boole:/home/staff/todd/.ssh/authorized_keys file? this may allow you in.
 
Old 08-17-2010, 11:47 AM   #14
techterling
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
[todd@boole .ssh]$ ls -al
total 24
drwx------ 2 todd staff 4096 Aug 17 12:27 .
drwxr-xr-x 72 todd staff 12288 Aug 17 12:26 ..
-rw-r--r-- 1 todd staff 400 Aug 17 12:27 known_hosts

is that it?

-T
 
Old 08-17-2010, 11:48 AM   #15
techterling
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
sorry, here is the old .ssh directory... i just moved it so it would recreate...

[todd@boole ~]$ ls -al ssh
total 64
drwx------ 2 todd staff 4096 Aug 16 11:39 .
drwxr-xr-x 72 todd staff 12288 Aug 17 12:26 ..
-rw------- 1 todd staff 2758 Aug 17 12:00 authorized_keys2
-rw-r--r-- 1 todd staff 597 Sep 3 2008 authorized_keys.old
-rw------- 1 todd staff 668 Sep 3 2008 id_dsa
-rw-r--r-- 1 todd staff 597 Sep 3 2008 id_dsa.pub
-rw-r--r-- 1 todd staff 12056 Aug 17 12:09 known_hosts
-rw-r--r-- 1 todd staff 15051 Sep 15 2009 known_hosts.old

-t
 
  


Reply

Tags
authentication, nis



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem regarding NIS authentication rsehgal Linux - Newbie 0 10-12-2008 04:42 AM
NIS authentication tonyr321 Linux - Software 0 08-29-2005 03:02 PM
windows authentication NIS varun_33 Linux - Networking 0 06-02-2005 09:09 AM
Can SAMBA use NIS authentication jongun78 Linux - Networking 0 01-28-2004 05:26 PM
NIS and pam/gdm authentication failure cquense Linux - Networking 0 07-05-2001 03:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration