LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   NIS Authentication Issue (https://www.linuxquestions.org/questions/linux-server-73/nis-authentication-issue-826610/)

techterling 08-16-2010 04:03 PM

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

cjcox 08-16-2010 10:08 PM

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.

techterling 08-17-2010 09:39 AM

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

stuart_cherrington 08-17-2010 09:58 AM

do you perhaps have a local account in /etc/passwd and /etc/nsswitch.conf is looking at 'files nis'?

techterling 08-17-2010 10:37 AM

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

stuart_cherrington 08-17-2010 10:40 AM

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?

techterling 08-17-2010 10:47 AM

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"

techterling 08-17-2010 10:59 AM

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.

:-(

stuart_cherrington 08-17-2010 11:00 AM

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.

techterling 08-17-2010 11:10 AM

[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.

stuart_cherrington 08-17-2010 11:26 AM

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.

techterling 08-17-2010 11:32 AM

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

stuart_cherrington 08-17-2010 11:40 AM

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.

techterling 08-17-2010 11:47 AM

[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

techterling 08-17-2010 11:48 AM

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


All times are GMT -5. The time now is 01:34 PM.