Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Dec 2001 10:14:38 -0500
From:      ScaryG <freymann@scaryg.shacknet.nu>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   adduser in a perl script question
Message-ID:  <20011228101438.187f0eb0.freymann@scaryg.shacknet.nu>

next in thread | raw e-mail | index | archive | help
Hi Gang.

I'm trying to automate the creation of a new user in a perl5 script.

The following does not work:

$error = `/usr/sbin/adduser -shell $shell -fullname $name -password
$password -username $username -home /home/$name`;

This runs as root and the variables are populated in advance.

I've read the man(8) page for adduser but it's not helping. I need to set
the password which is why I'm not using pw. The man pages for pw talk
about a pipe for the password but there are no examples.

I'm hoping somebody else out there can toss me a pointer or two to make
this work?

Thanks in advance...

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?20011228101438.187f0eb0.freymann>