Re: Public key auth and PAM

From: Darren Tucker (dtucker_at_dodgy.net.au)
Date: 12/09/03


Date: Tue, 09 Dec 2003 00:57:27 GMT

In article <br21f7$6gr$1@server4.gts.cz>, David Hajek <david@hajek.net> wrote:
>I think that PAM isn't taken into acount when public key authentication is
>on. I disabled access in PAM for all users and allowed login for only thouse
>which are listed via pam_list_file. But I found that all users are still
>allowed to login when they're use public key.
>
>Is it possible to tell SSH to check PAM access controls even public keys are
>on?

You need to add pam_list_file to the account part of the PAM config,
not just auth. Then it should do what you want, as sshd already checks
the status of pam_acct_mgmt().

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


Relevant Pages

  • Public key auth and PAM
    ... I think that PAM isn't taken into acount when public key authentication is ... I disabled access in PAM for all users and allowed login for only thouse ...
    (comp.security.ssh)
  • Re: SSHD (openssh) responds too quickly for bad password.
    ... >> As far as I know, PAM is also used when you login with telnet. ... in this case PAM. ... Swatch isn't the only log monitoring tool out there. ...
    (comp.security.ssh)
  • SUMMARY: Single User Mode login to SunfireV120 with Solaris 8 fails
    ... My problem boiled down to multiuser login working fine yet in single user ... Feb 9 10:01:31 PAM: pam_set_item ... (or give root password for system maintenance): ...
    (SunManagers)
  • Re: Samba passwords
    ... > found it hard to understand and the pam man page even worse. ... It is possible to use pam_smbpass to have login, sshd, etc. authenticate ... against the SMB password database instead of /etc/passwd. ... I think you'll still need UNIX accounts to ...
    (freebsd-questions)
  • Re: passwords not recognized when suing from a terminal
    ... the passwords are no longer accepted. ... I can still login OK from the initial login ... You may also want to turn on some 'debug' option flag in the pam modules. ... # Uncomment the following line to implicitly trust users in the "wheel" group. ...
    (Fedora)