Date: Mon, 25 Aug 2003 22:21:38 +0100 From: Ceri Davies <setantae@submonkey.net> To: Charles Howse <chowse@charter.net> Cc: freebsd-questions@freebsd.org Subject: Re: Using chpass Message-ID: <20030825212138.GL2947@submonkey.net> In-Reply-To: <002e01c36b4c$cfe78910$04fea8c0@moe> References: <20030825205300.GK2947@submonkey.net> <002e01c36b4c$cfe78910$04fea8c0@moe>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Mon, Aug 25, 2003 at 04:06:54PM -0500, Charles Howse wrote:
> > > Can someone please set me straight?
> >
> > chpass -a "toor::0:0::0:0:Nobody Important:/root:/sbin/nologin" toor
>
> Ahaaa! The quotes! Thank you!
Well, that, plus the fields for the change and expire times.
> > Note, however, that you're setting the password for this user
> > to a null
> > password, allowing any local user in wheel to "su -m toor" if you have
> > added /sbin/nologin to /etc/shells.
>
> Understood, if I wanted to keep the same password.....wait a
> minute....what is the default password for toor?
toor normally has a master.passwd entry of '*', meaning that password
authentication will always fail.
> If I wanted to insert a new password, I'd have to use crypt, and paste
> the encrypted password into the proper field, correct?
>
> Proper syntax? Crypt newpassword...?
> I read the crypt/enigma man page and did:
> # crypt newpassword
> (Nothing............................................)
> ^C
> #
crypt(1) is intended for obfuscating file contents really, not for generating
password hashes (for that, you'd want crypt(3)).
The simplest way to do it would be to either copy the current hash from
/etc/master.passwd, or originally use *, and then change it with passwd(1).
You can generate password hashes with simple scripts, but that's slightly
more involved than I want to go into at the moment (I'm cooking dinner!).
Ceri
--
User: DO YOU ACCEPT JESUS CHRIST AS YOUR PERSONAL LORD AND SAVIOR?
Iniaes: Sure, I can accept all forms of payment.
-- www.chatterboxchallenge.com
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQE/Sn3iocfcwTS3JF8RAmj1AKC73YxIfSr4qcha9TmSny+70N5Z1ACgrtiJ
cbBfzy4Ap5oVO3bJhFaF+tg=
=Xbet
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030825212138.GL2947>
