Re: useradd/adduser

From: Peter Pentchev (roam@orbitel.bg)
Date: 05/02/01


Date: Wed, 2 May 2001 18:02:57 +0300
From: Peter Pentchev <roam@orbitel.bg>
To: Lee Smallbone <lee@kechara.net>

On Wed, May 02, 2001 at 03:59:50PM +0100, Lee Smallbone wrote:
> I see what you mean about the synopsis...!
>
> From what I can see it isn't possible to supply the password to pw?
> I'm using md5 passwords, and can easily have the script in question encode
> the password prior to calling pw, so is it possible to use (in the verse of
> pw), something along the lines of:
>
> pw useradd -n test -c "Test User" -d /home2/test -m -s sh $md5encpass
>
> ?

You can't supply an *encrypted* pass; but then, you can't do this with
adduser, either. You *can* supply a cleartext password to pw(8), just
as Sheldon said, using the -h option:

echo unf | pw useradd testuser -h 0

..just tell it to read the password from fd 0 (stdin).

G'luck,
Peter

-- 
I am the meaning of this sentence.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message


Relevant Pages

  • Re: hwo to match more than 1 line?
    ... >explained, and a couple of modifiers, whose meaning you can read about ... my $namehtml = <STDIN>; ... >run and that illustrates that the above regex fails in extracting the ...
    (comp.lang.perl.misc)
  • Re: OT: What is the meaning of /proc/$PID/fd/* files?
    ... Matej Kosik: ... I am trying to figure out the meaning of: ... These files represent the open files of a process. ... File descriptor 0 should usually be stdin. ...
    (Debian-User)
  • Re: Limiting closed port RST response from 381 to 200 p
    ... >> Actually Sheldon I think that's a great idea - helps with ... >> syslog DoS somewhat as well. ... > syslog coalesce them) is representative of the majority of folks to whom ... with "unsubscribe freebsd-security" in the body of the message ...
    (FreeBSD-Security)
  • Re: something to help Daves game
    ... quite a few games for me.I've been meaning to send it back to Sheldon to have another shaft made for it but I can't put it down long enough for that to happen. ...
    (rec.sport.billiard)
  • Re: Dinner tonight
    ... It's interesting how this misspelled word, butt, changes the entire meaning. ... Are you Sheldon? ...
    (rec.food.cooking)