The error results of useradd appear to go to STDERR instead of STDOUT.
You can redirect them to STDOUT, and therefore capture the results, like
this:
my $username='username';
my $rescmd=`/usr/sbin/useradd -s /bin/false $username 2>&1`;
chomp $rescmd;
print "Result is $rescmd\n";
On Fri, 2003-01-3
Martín Alejandro Carmona Selva wrote:
> Hello, i am a little more than just a newbie to perl...
> I am writting some perlbased XMLRPC to perform actions on my server
> as I connect via web.
>
> i am doing a simple task (adding an user) but, no matter how hard I
> try I cannot get the result from t
Hello, i am a little more than just a newbie to perl...
I am writting some perlbased XMLRPC to perform actions on my server as I
connect via web.
i am doing a simple task (adding an user) but, no matter how hard I try I
cannot get the result from that command into the variable.
Let me put the e