Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 May 1999 19:07:02 -0700 (PDT)
From:      Doug White <dwhite@resnet.uoregon.edu>
To:        Andy <andylau@163.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Please Help!
Message-ID:  <Pine.BSF.4.03.9905221904570.15248-100000@resnet.uoregon.edu>
In-Reply-To: <001001bea462$686b10f0$0200000a@studiodlp01>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 22 May 1999, Andy wrote:

>     I am a newer to Freebsd,I use the Freebsd2.2.5 two weeks ago, I
> found the command "adduser" can create user in batch mode(adduser
> -batch ...), Now ,I got the Freebsd 3.0,I found the "adduser" does not
> support the option "-batch" any more,system tell me to use the
> "pw",but I can not understant it , In "pw useradd",it use the option
> "-h fd" to input password,I don't know what it the "fd".How can I
> adduser in batch mode use the command "pw" in Freebsd3.0? thank you!

The -h option allows you to specify a file descriptor to read from instead
of standard input for the password.  For most uses, you will not need this
option.  Simply write the desired password down stdout (such as a pipe)
and pw will add it in.

The -h is useful if you're fork() and exec()ing pw, and have set a file
descriptor to not close-on-exit.  You can specify this descriptor to pw,
then write it from the parent.  If this makes no sense don't worry about
it. :)

Doug White                               
Internet:  dwhite@resnet.uoregon.edu    | FreeBSD: The Power to Serve
http://gladstone.uoregon.edu/~dwhite    | www.freebsd.org



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.03.9905221904570.15248-100000>