Re: Lock Account
From: Brian Hatch (secure-shell@ifokr.org)
Date: 02/21/03
- Previous message: STEWARD, Curtis (Jamestown): "RE: make x.509 certificate authentication work with ssh"
- In reply to: Parsons, Rick: "RE: Lock Account"
- Next in thread: Jim Geovedi: "Re: Lock Account"
- Reply: Jim Geovedi: "Re: Lock Account"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 21 Feb 2003 11:12:46 -0800 From: Brian Hatch <secure-shell@ifokr.org> To: "Parsons, Rick" <rick.parsons@eds.com>
> > 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:
...
>
> ... this is a very dangerous MYTH. It does not disable the account (there is
> no comment structure for the passwd file), all it does is change the name of
> it. So, although the user can no longer log into to the "miguel" account,
> they could log into one called "*miguel".
...
However if you prepend with "-" that will disable the account on many
unix variants by abusing an NIS trick. (You dictate which NIS accounts
or groups to not include by using -name entries.)
Try it out:
$ tail -1 /etc/passwd
badguy:x:1000:1000:Some bad user:/home/badguy:/bin/sh
$ perl -e 'while (($username)=getpwent()) { print " $username\n"; }' | grep badguy
badguy
# vi /etc/passwd
(prepend '-')
$ tail -1 /etc/passwd
-badguy:x:1000:1000:Some bad user:/home/badguy:/bin/sh
$ perl -e 'while (($username)=getpwent()) { print " $username\n"; }' | grep badguy
$
> Depending on the password management system on your system, there are
> betters ways to disable accounts. On a traditional unix system using 13
> character password hashes, an effective way is to insert the "*" onto the
> front of the hashed passwd making it 14 characters and containing an invalid
> character. No login will succeed but all other services function as normal
Still doesn't work if the user has alternate authentication methods, such as
SSH identities, which do not require valid /etc/shadow entries. Better
to remove the whole account by editing /etc/passwd.
-- Brian Hatch Ever wonder what the Systems and speed of lightning Security Engineer would be if it www.hackinglinuxexposed.com didn't zigzag? Every message PGP signed
- application/pgp-signature attachment: stored
- Next message: Stanislas Rusinsky: "SSH unable to read my keys"
- Previous message: STEWARD, Curtis (Jamestown): "RE: make x.509 certificate authentication work with ssh"
- In reply to: Parsons, Rick: "RE: Lock Account"
- Next in thread: Jim Geovedi: "Re: Lock Account"
- Reply: Jim Geovedi: "Re: Lock Account"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|