Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Mar 2001 22:15:56 -0800
From:      "Shawn Ramsey" <shawn@megadeth.org>
To:        <bsd-freak@mbox.com.au>, <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Adding Users with a shell script
Message-ID:  <01eb01c0b8e0$e29b7d80$fe48a93f@shawn>
References:  <27396d277a9b.277a9b27396d@mbox.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help


> Hiya all,
>
> I need to be able to add users to be FreeBSD box via a shell script. On
> Linux this was a simple affair as I could have something like:
>
> adduser -G pop3 -s /bin/false -p secret joe
>
> This would add the user joe to the system with the next available UID,
> no login shell, add him to the pop3 group and set his password to
"secret".
>
> How do I do this on FreeBSD as the "adduser" utility on FreeBSD insists
> on being completly interactive even in "silent" mode (-s) and even when
> I pass all my options to it via the command line switches.

Have you looked at "pw" ? It is completly non-interactive, and pretty much
anything parameter can be passed to it.




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?01eb01c0b8e0$e29b7d80$fe48a93f>