openssh ignores locked account using public key authentication

Michael Torrie torriem at chem.byu.edu
Mon Oct 3 17:54:18 MDT 2005


On Mon, 2005-10-03 at 13:42 -0600, Andrew McNabb wrote:
> On Mon, Oct 03, 2005 at 01:40:51PM -0600, Erik R. Jensen wrote:
> > It appears that when using public key authentication with openssh, the
> > locked status of an account is ignored. This means I can issue "passwd
> > -l", and if the user had setup ssh keys for authentication, they can still
> > login. I know there are other ways to further lock an account which I have
> > been doing, but I really just want openssh to respect the "!" that gets
> > placed in the shadow file when a "passwd -l" is issued. Is there a change
> > I can make in /etc/pam.d/sshd to force this check to happen or something I
> > am just overlooking?
> > 
> 
> One of the traditional way to lock an account is to set the shell to
> /bin/false.  Theoretically there might still be some problem with that,
> too, but I can't think of anything.

If you use the form "ssh -l user host command," ssh will run the command
without running the shell at all.  Thus someone could involve pretty
much any command via ssh regardless of the shell setting.


> 
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
-- 
Michael Torrie <torriem at chem.byu.edu>



More information about the PLUG mailing list