Date: Mon, 21 Jan 2002 19:25:52 -0500 (EST) From: "Philip M. Gollucci" <gollucci@wam.umd.edu> To: ScaryG <freymann@eagle.ca> Cc: Joe & Fhe Barbish <barbish@a1poweruser.com>, FBSD Questions <questions@FreeBSD.ORG> Subject: Re: How to adduser from script? Message-ID: <Pine.GSO.4.21.0201211924340.19011-100000@rac4.wam.umd.edu> In-Reply-To: <3C4BEF68.32535.78858E@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
I don't know if this is a good idea, but I have a web based login system. It creates the users in a MySQL database. This is all fine and good, but I want to also add them as system users in master.passwd . It is my understanding that I need to do some kind of setuid script like the one below. Anyone how or where to look. ***************************************************************************** Philip M. Gollucci (p6m7g8) Web-site : http://www.p6m7g8.com E-mail : gollucci@wam.umd.edu Philip@p6m7g8.com Phone : 301.249.6261 (Home) 301.314.3118 (College) Major : Computer Science Minor : Classical & Jazz Performance Current Job : Science, Discovery, & the Universe Webmaster URL: http://www.sdu.umd.edu Resume : http://www.wam.umd.edu/~gollucci/resume.html ***************************************************************************** On Mon, 21 Jan 2002, ScaryG wrote: > > 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 > 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.GSO.4.21.0201211924340.19011-100000>