Hello Alessandro Lenzen -

I tried that. The perl script with the "adduser" command is getting executed
if I execute it from the command prompt when I am logged in as "root", but
the same script script doesn't get executed from the browser. The web server
error_log file doesn't show any error description. Following is a sample
perl script:

---------- script starts -----------
#!/usr/local/bin/perl

print "content-type:text/plain";
print "adding new user...";

system("adduser test1");

print "added new user.";
---------- script ends -----------

The above script executes well when invoked from a command prompt and the
user test1 is created, but when I execute the same script from the browser,
it just prints - adding new user - and stops there. No user by the name of
test1 is created. Please note that each time the script gets executed
successfully, I change the user name and make it test1, test2, test3 and so
on. The path of the above script is as follows:
/home/httpd/cgi-bin/perl/adduser.pl and its file permissions are 755. Any
clue what went wrong? Thanks.

Kind regards.

KK
[EMAIL PROTECTED]

-- Original Message -----
From: Alessandro Lenzen <[EMAIL PROTECTED]>
To: KK <[EMAIL PROTECTED]>
Sent: Wednesday, July 25, 2001 4:00 PM
Subject: AW: Linux commands in perl


> You can use the command "adduser" if the program has root permissions.
> al
>
> -----Ursprüngliche Nachricht-----
> Von: KK [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 25. Juli 2001 12:17
> An: Jim Conner
> Cc: [EMAIL PROTECTED]
> Betreff: Re: Linux commands in perl
>
>
> Hello Jim/Perl Folks -
>
> Cud u kindly help me with the following:
>
> Just was curious if one can create system user accounts using the command
> "adduser" from inside a perl script, which will be called from a browser
or
> from within a java servlet? Is there any other way to create dynamic
system
> user accounts by executing a perl script? If yes, then can one suggest the
> script code? If, no, then what is the alternative? Thanks.
>
> Kind regards.
>
> KK
> [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to