web-dev-qa-db-ja.com

sshログイン後のSSHインスタントログアウトkerberos / winbind

W2k8ドメインのActiveDirectoryに対して認証を行うubuntuサーバーをセットアップしました。すべてがうまくいき、getentpasswdとwbinfoのすべてのユーザーが表示されます。

マシンでkerberosとwinbindauthを使用できるようにしたいのですが、これまでのところすべてが機能しています。

しかし、ADユーザーを使用してサーバーにログインすると、motdが表示され、promtを取得する代わりに、再度ログアウトします。

auth.log

Feb 28 15:34:48 server sshd[12635]: Postponed keyboard-interactive for micha from 10.10.10.121 port 36519 ssh2 [preauth]
Feb 28 15:34:50 server sshd[12637]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=ub64-it.city.domain.org  user=micha
Feb 28 15:34:50 server sshd[12637]: pam_krb5(sshd:auth): pam_sm_authenticate: entry (nonull)
Feb 28 15:34:50 server sshd[12637]: pam_krb5(sshd:auth): (user micha) attempting authentication as [email protected]
Feb 28 15:34:50 server sshd[12637]: pam_krb5(sshd:auth): user micha authenticated as [email protected]
Feb 28 15:34:50 server sshd[12637]: pam_krb5(sshd:auth): pam_sm_authenticate: exit (success)
Feb 28 15:34:50 server sshd[12637]: pam_winbind(sshd:account): user 'micha' granted access
Feb 28 15:34:50 server sshd[12635]: Postponed keyboard-interactive/pam for micha from 10.10.10.121 port 36519 ssh2 [preauth]
Feb 28 15:34:50 server sshd[12635]: Accepted keyboard-interactive/pam for micha from 10.10.10.121 port 36519 ssh2
Feb 28 15:34:50 server sshd[12635]: pam_krb5(sshd:session): pam_sm_open_session: entry
Feb 28 15:34:50 server sshd[12635]: pam_krb5(sshd:session): no context found, creating one
Feb 28 15:34:50 server sshd[12635]: pam_krb5(sshd:session): (user micha) found initial ticket cache at /tmp/krb5cc_pam_e12637
Feb 28 15:34:50 server sshd[12635]: pam_krb5(sshd:session): (user micha) initializing ticket cache FILE:/tmp/krb5cc_72208_e12635
Feb 28 15:34:50 server sshd[12635]: pam_krb5(sshd:session): pam_sm_open_session: exit (success)
Feb 28 15:34:50 server sshd[12635]: pam_unix(sshd:session): session opened for user micha by (uid=0)
Feb 28 15:34:50 server sshd[12771]: Received disconnect from 10.10.10.121: 11: disconnected by user
Feb 28 15:34:50 server sshd[12635]: pam_krb5(sshd:session): pam_sm_close_session: entry (silent)
Feb 28 15:34:50 server sshd[12635]: pam_krb5(sshd:session): pam_sm_close_session: exit (success)
Feb 28 15:34:50 server sshd[12635]: pam_unix(sshd:session): session closed for user micha

SSHクライアントは、閉じていることを教えてくれます

    Last login: Thu Feb 28 15:25:26 2013 from ub64-it.city.domain.org
    Connection to server closed

そして-vvで私は見る:

    debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
    debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
    debug2: channel 0: rcvd eow
    debug2: channel 0: close_read
    debug2: channel 0: input open -> closed
    debug2: channel 0: rcvd eof
    debug2: channel 0: output open -> drain
    debug2: channel 0: rcvd close
    Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-37-virtual x86_64)

     * Documentation:  https://help.ubuntu.com/

      System information as of Thu Feb 28 15:40:36 EAT 2013

      System load:  0.0                Users logged in:     1
      Usage of /:   16.7% of 18.21GB   IP address for eth0: 10.10.11.9
      Memory usage: 48%                IP address for tap0: 10.10.14.1
      Swap usage:   0%                 IP address for tap1: 10.10.12.1
      Processes:    94                 IP address for tun0: 10.10.13.1

      Graph this data and manage this system at https://landscape.canonical.com/


    The programs included with the Ubuntu system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.

    Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
    applicable law.

    Last login: Thu Feb 28 15:34:50 2013 from ub64-it.city.domain.org
    debug2: channel 0: obuf empty
    debug2: channel 0: close_write
    debug2: channel 0: output drain -> closed
    debug2: channel 0: almost dead
    debug2: channel 0: gc: notify user
    debug2: channel 0: gc: user detached
    debug2: channel 0: send close
    debug2: channel 0: is dead
    debug2: channel 0: garbage collecting
    debug1: channel 0: free: client-session, nchannels 1
    Connection to server closed.

何か案は?

よろしくマイケル

2
Meiko Watu

わかりました。ユーザーの詳細を確認することで解決しました。非常に単純で、winbindから正しいシェルが割り当てられていませんでした。 SOしたがって、motdを通過してからログアウトしました。smb.conf : template Shell = /bin/bash それでおしまい。

2
Meiko Watu