Hello all.
I'm trying to get a SuSE 9 Linux NIS client to connect to a Solaris 10
NIS server, with some difficulty.
I can get the client to bind.
[root@mp-03 ~]>> rpcinfo -p localhost
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 32768 status
100021 1 udp 32768 nlockmgr
100021 3 udp 32768 nlockmgr
100021 4 udp 32768 nlockmgr
100024 1 tcp 32768 status
100021 1 tcp 32768 nlockmgr
100021 3 tcp 32768 nlockmgr
100021 4 tcp 32768 nlockmgr
100007 2 udp 807 ypbind
100007 1 udp 807 ypbind
100007 2 tcp 810 ypbind
100007 1 tcp 810 ypbind
the command rpcinfo -u localhost ypbind returns the following values:
[root@mp-03 ~]>> rpcinfo -u localhost ypbind
program 100007 version 1 ready and waiting
program 100007 version 2 ready and waiting
I can perform a ypmatch
[root@mp-03 ~]>> ypmatch -k chris passwd
chris chris:moOfMUdmr9FoM:50000:50004:christian
charette:/export/home/chris:/bin/sh
So that's good. I've removed c2secure on the NIS master, and I now get
the passwords returned in the passwd.byname map. This isn't perfect,
as I'd rather have c2secure on the Solaris server on AND get the Linux
client to authenticate clients, but I'm trying to deal with issues one
at a time.
I have the following values set in various configuration files for
compatibility mode:
[root@mp-03 ~]>> tail -2 /etc/passwd
+:Allowed_group:::::
-:*:::::
[root@mp-03 ~]>> tail -1 /etc/shadow
+::::::::
[root@mp-03 ~]>> tail -1 /etc/group
+:::
/etc/nsswitch.conf has the following set:
passwd: compat
group: compat
My user is set in the netgroup. This setup works fine with the Solaris
clients.
[root@mp-03 ~]>> ypmatch -k Allowed_group netgroup
Allowed_group (,chris,mydomain) (,user1,mydomain) (,user2,mydomain)
(,bob,mydomain)
Here are my symptoms:
A) On Linux, when I attempt to do an su to a user (chris) from root, I
get the following errors:
[root@mp-03 ~]>> su - chris
[root@MP-03] # bash
[I have no name!@mp-03 ~]>> whoami
whoami: cannot find username for UID 50000
[I have no name!@mp-03 ~]>> id
uid=50000 gid=50004 groups=50004
Though I could su into my user, and it found the right UID for him, my
user doesn't seem too happy with things.
B) SSH works for local users. When I try to login using SSH on an NIS
account, my session fails. Here is the trace I get from syslog (I set
the syslog level to auth.debug + the sshd to log at debug level):
Jun 15 10:20:20 mp-03 sshd[19542]: debug1: Forked child 19736.
Jun 15 10:20:20 mp-03 sshd[19736]: Connection from 192.168.180.140 port
23041
Jun 15 10:20:20 mp-03 sshd[19736]: debug1: Client protocol version 2.0;
client software version Sun_SSH_1.1
Jun 15 10:20:20 mp-03 sshd[19736]: debug1: no match: Sun_SSH_1.1
Jun 15 10:20:20 mp-03 sshd[19736]: debug1: Enabling compatibility mode
for protocol 2.0
Jun 15 10:20:20 mp-03 sshd[19736]: debug1: Local version string
SSH-1.99-OpenSSH_3.8p1
Jun 15 10:20:21 mp-03 sshd[19736]: debug1: PAM: initializing for
"chris"
Jun 15 10:20:21 mp-03 sshd[19736]: debug1: PAM: setting PAM_RHOST to
"om-00"
Jun 15 10:20:21 mp-03 sshd[19736]: debug1: PAM: setting PAM_TTY to
"ssh"
Jun 15 10:20:21 mp-03 sshd[19736]: Failed none for chris from
192.168.180.140 port 23041 ssh2
Jun 15 10:20:24 mp-03 sshd[19736]: error: PAM: Authentication failure
Jun 15 10:20:24 mp-03 sshd[19736]: Failed keyboard-interactive/pam for
chris from 192.168.180.140 port 23041 ssh2
Jun 15 10:20:25 mp-03 sshd[19736]: error: PAM: Authentication failure
Jun 15 10:20:25 mp-03 sshd[19736]: Failed keyboard-interactive/pam for
chris from 192.168.180.140 port 23041 ssh2
Jun 15 10:20:25 mp-03 sshd[19736]: error: PAM: Authentication failure
Jun 15 10:20:25 mp-03 sshd[19736]: Failed keyboard-interactive/pam for
chris from 192.168.180.140 port 23041 ssh2
Jun 15 10:20:26 mp-03 sshd[19736]: error: Could not get shadow
information for chris
Jun 15 10:20:26 mp-03 sshd[19736]: Failed password for chris from
192.168.180.140 port 23041 ssh2
Jun 15 10:20:27 mp-03 last message repeated 2 times
Jun 15 10:20:27 mp-03 sshd[19736]: debug1: do_cleanup
Jun 15 10:20:27 mp-03 sshd[19736]: debug1: PAM: cleanup
C) I try the same test using SSH keys (rather than password
authentication). Below is the output that I get. Notice that SSH
reports a key pair match, and fails at the pam_unix2 module:
Jun 15 10:22:55 mp-03 sshd[19542]: debug1: Forked child 20331.
Jun 15 10:22:55 mp-03 sshd[20331]: Connection from 192.168.180.140 port
23072
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: Client protocol version 2.0;
client software version Sun_SSH_1.1
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: no match: Sun_SSH_1.1
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: Enabling compatibility mode
for protocol 2.0
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: Local version string
SSH-1.99-OpenSSH_3.8p1
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: PAM: initializing for
"chris"
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: PAM: setting PAM_RHOST to
"om-00"
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: PAM: setting PAM_TTY to
"ssh"
Jun 15 10:22:55 mp-03 sshd[20331]: Failed none for chris from
192.168.180.140 port 23072 ssh2
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: temporarily_use_uid:
50000/50004 (e=0/0)
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: trying public key file
/export/home/chris/.ssh/authorized_keys
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: matching key found: file
/export/home/chris/.ssh/authorized_keys, line 2
Jun 15 10:22:55 mp-03 sshd[20331]: Found matching DSA key:
ed:4c:e6:02:4c:c9:61:3a:87:70:13:e7:1e:99:43:42
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: restore_uid: 0/0
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: temporarily_use_uid:
50000/50004 (e=0/0)
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: trying public key file
/export/home/chris/.ssh/authorized_keys
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: matching key found: file
/export/home/chris/.ssh/authorized_keys, line 2
Jun 15 10:22:55 mp-03 sshd[20331]: Found matching DSA key:
ed:4c:e6:02:4c:c9:61:3a:87:70:13:e7:1e:99:43:42
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: restore_uid: 0/0
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: ssh_dss_verify: signature
correct
Jun 15 10:22:55 mp-03 sshd[20331]: Accepted publickey for chris from
192.168.180.140 port 23072 ssh2
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: monitor_child_preauth: chris
has been authenticated by privileged process
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: PAM: reinitializing
credentials
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: permanently_set_uid:
50000/50004
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: Entering interactive session
for SSH2.
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: server_init_dispatch_20
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: server_input_channel_open:
ctype session rchan 0 win 65536 max 16384
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: input_session_request
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: channel 0: new
[server-session]
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: session_new: init
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: session_new: session 0
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: session_open: channel 0
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: session_open: session 0:
link with channel 0
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: server_input_channel_open:
confirm session
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: server_input_channel_req:
channel 0 request pty-req reply 0
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: session_by_channel: session
0 channel 0
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: session_input_channel_req:
session 0 req pty-req
Jun 15 10:22:55 mp-03 sshd[20333]: fatal: login_get_lastlog: Cannot
find account for uid 50000
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: do_cleanup
Jun 15 10:22:55 mp-03 sshd[20333]: debug1: PAM: cleanup
Jun 15 10:22:55 mp-03 sshd[20333]: pam_unix2: cannot get options
Jun 15 10:22:55 mp-03 PAM-env[20333]: Unable to open config file:
Permission denied
Jun 15 10:22:55 mp-03 sshd[20333]: pam_unix2: cannot get options
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: do_cleanup
Jun 15 10:22:55 mp-03 sshd[20331]: debug1: PAM: cleanup
The pam_unix2 seems to be at the heart of the problem (the 2nd listing
even authenticates public keys (bypassing passwords, but fails at
pam_unix2).
Any ideas? My Solaris clients work well... so what do I have to do to
get the two to talk to each other?
|