Re: Lock Account

From: Miguel González Castaños (
Date: 02/20/03

  • Next message: Greg Paik: "RE: OpenSSH_3.5p1 server, PC clients cannot connect"
    Date: Thu, 20 Feb 2003 17:57:43 +0100
    From: Miguel González Castaños <>

    If you want to disable a user temporaly you can add an asterisk (*) before the corresponding entry
    of that
    user in the /etc/passwd file:


     miguel:x:500:500:miguel gonzalez:/home/miguel:/bin/bash

     *miguel:x:500:500:miguel gonzalez:/home/miguel:/bin/bash



    openssh ha escrito:

    > Hi !
    > How can I lock an account.
    > I have got several ssh user, which I only would like to permit keyfile logins;
    > as a matter of fact I would like to lock their accounts.
    > I tried usermod -L -p username -> which puts -L before the passwd in /etc/shadow but it is still
    > Possible to login via passwd and ssh ?!
    > I use debian linux woody
    > __________________________________________________________
    > Nik Engel NETWAYS GmbH
    > Senior Systems Engineer Deutschherrnstr. 47a
    > Fon.0911/92885-13 D-90429 Nürnberg
    > Fax.0911/92885-33