Re: sshd open to everyone if PAM auth sufficient

From: Bill Unruh (unruh@physics.ubc.ca)
Date: 04/10/02


From: unruh@physics.ubc.ca (Bill Unruh)
Date: 9 Apr 2002 22:16:20 GMT

In <a8v7d1$pvi$1@fe2.cs.interbusiness.it> "Niccolo Rigacci" <niccolo@texnet.it> writes:

]Package: ssh
]Version: 3.0.2p1-8

]I was playing with PAM, and I discovered something potentially
]dangerous. I changed the auth from "required" to "sufficient"
](in order to add - later - other PAM modules) in the PAM
]configuration file for ssh.

sufficient means the if it passes that item, then that is all that is
needed for entry. If it fails, then it is ignored, and the other items
are checked. With no other items of any note, you are letting people in.
required means that if that item fails, then authentication fails and
trhe suer is denied. If it succeeds, then other tests may be applied as
well.
Ie, you reasons for change are invalid. You should have left it as
required.

(required is logical and. sufficient is logical or.)

]auth required pam_nologin.so A
]auth sufficient pam_unix.so B
]auth required pam_env.so # [1] C

(A and C) or B

authenticates.

]account required pam_unix.so
]session required pam_unix.so
]session optional pam_lastlog.so # [1]
]session optional pam_motd.so # [1]
]session optional pam_mail.so standard noenv # [1]
]session required pam_limits.so
]password required pam_unix.so



Relevant Pages

  • R: sshd open to everyone if PAM auth sufficient
    ... >]configuration file for ssh. ... If it fails, then it is ignored, and the other items ... how can I request to PAM the following logical ... I want my users to autenticate to Unix passwords or fallback to Samba ...
    (comp.security.ssh)
  • sshd open to everyone if PAM auth sufficient
    ... I was playing with PAM, ... I changed the auth from "required" to "sufficient" ... configuration file for ssh. ... Apr 9 18:46:48 pigbox sshd: Accepted password for root from ...
    (comp.security.ssh)
  • Re: How restrict network login on AIX for everything BUT SSH? (RLOGIN=FALSE & loginrestrictions
    ... Unfortunately I WANT to disable telnet, rsh, rlogin etc for an account, BUT keep SSH enabled. ... However in Aix v5.3 full pam support was added, and our LAM module broke and we have been unable to figure out how to get it working again. ...
    (comp.security.ssh)
  • RE: PAM and SSH
    ... It appears that for sshd, sshusers would have to be their primary group ... The nsswitch.conf list files and winbind for groups but the ssh documentation said that only primary groups were used. ... Perhaps a simple PAM module that takes a network description and succeeds if the user's IP is on that network would not be a huge task. ...
    (SSH)
  • Re: sasl fails
    ... PAM here means you let PAM call system accounts, ... If you don't offer MD5 mechs because of your auth backend, ... > authentication failure: no secret in database ...
    (Fedora)