[sudo-users] adduser via web (cgi script)
Moss, Leonard J.
ljm at slac.stanford.edu
Thu Jul 29 21:12:20 EDT 2004
On Wed, 28 Jul 2004 at 17:03 [-0700], Erickson N. Jacob wrote:
>
> hi all
>
> i have a cgi scipt to add user accounts via web
>
> system ("/usr/bin/sudo /usr/sbin/useradd", $user);
Is this a Perl cgi script? If so, I think you either need to
interpolate $user into the preceding string or else (probably
better, depending on how carefully you check $user) make
"/usr/sbin/useradd" a separate argument. Perl's system function
behaves differently depending on whether there are one or more
than one arguments.
>
> my problem is that it wont create the user. i have already added the user
> nobody in the /etc/sudoers file to permit nobody to execute the useradd
> command
>
> any advice on this
>
>
> thanks
>
>
> ____________________________________________________________
> sudo-users mailing list <sudo-users at sudo.ws>
> For list information, options, or to unsubscribe, visit:
> http://www.sudo.ws/mailman/listinfo/sudo-users
>
More information about the sudo-users
mailing list