G
Gary Perkins
Howdy People,
I am not a Perl guy and have to make some code work. We have a password
reset facility that is Perl cgi based and simply generates a password,
writes it to an email and the passwd.txt file for the system we run. This
all works great except we then need to call a command to relod the password
file but as another user.
I have
my $reloadcmd = "su - ariba -c
\"/u01/app/AribaBuyer7/CoreServer/serverMonitor -host buy_test -username
aribasystem -password password -runTask ReloadPasswordFile -partition
wespar\"";
$reloadcmd =~ s/[\n]|[\r]//gi;
system($reloadcmd);
It doesnt appear to work at all. Have I escaped the quotes incorrectly, I
logged it to a text file and the command is coming out OK....I think?
The actual command that I know works is;
/u01/app/AribaBuyer7/CoreServer/serverMonitor -host buy_test -username
aribasystem -password password -runTask ReloadPasswordFile -partition wespar
Thanks
Gary
I am not a Perl guy and have to make some code work. We have a password
reset facility that is Perl cgi based and simply generates a password,
writes it to an email and the passwd.txt file for the system we run. This
all works great except we then need to call a command to relod the password
file but as another user.
I have
my $reloadcmd = "su - ariba -c
\"/u01/app/AribaBuyer7/CoreServer/serverMonitor -host buy_test -username
aribasystem -password password -runTask ReloadPasswordFile -partition
wespar\"";
$reloadcmd =~ s/[\n]|[\r]//gi;
system($reloadcmd);
It doesnt appear to work at all. Have I escaped the quotes incorrectly, I
logged it to a text file and the command is coming out OK....I think?
The actual command that I know works is;
/u01/app/AribaBuyer7/CoreServer/serverMonitor -host buy_test -username
aribasystem -password password -runTask ReloadPasswordFile -partition wespar
Thanks
Gary