Date: Mon, 21 Jan 2002 10:37:28 -0500 From: "ScaryG" <freymann@eagle.ca> To: "Joe & Fhe Barbish" <barbish@a1poweruser.com>, "FBSD Questions" <questions@FreeBSD.ORG> Subject: Re: How to adduser from script? Message-ID: <3C4BEF68.32535.78858E@localhost> In-Reply-To: <LPBBIGIAAKKEOEJOLEGOMEDNCNAA.barbish@a1poweruser.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 21 Jan 2002 at 10:26, Joe & Fhe Barbish wrote: > I am building a disaster recovery script. > I need to add 2 users, backup tape user, > and remote admin user. > Is there a command line command that I can do this with? I just recently did some tinkering with this, and the following works fine in a perl script: #/usr/bin/perl $password = "abc123"; $shell = "/sbin/nologin"; $username = "lusername"; `echo $password |/usr/sbin/pw adduser -s $shell -m -n $username -d /home/$username -h 0`; Have fun. gf 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?3C4BEF68.32535.78858E>