-S The -S (stdin) option causes sudo to read the password from stan-
dard input instead of the terminal device.
Joe Alotta
On Feb 26, 2004, at 9:48 PM, Riccardo Perotti wrote:
On 2/26/04 11:24 AM, "Sherm Pendley" <[EMAIL PROTECTED]> wrote:
On Feb 26, 2004, at 11:14 AM, Riccardo Perotti wrote:Thanks Sherm! That definitely looks like "a step in the right direction".
Can somebody point me in the right direction and / or contribute an idea for this?
Have a look at the man page for the 'killall' command. In short, it signals processes by name, so you don't need to know the PID. You can use system() to run it from Perl, like this:
#!/usr/bin/perl
use warnings; use strict;
system 'killall -KILL pppd';
sherm--
Now the only problem is that 'pppd' a process owned by root. Should my
script be run as 'root'? That sounds kind of dangerous! ... can it / should
it be done? When at the Terminal I have to 'sudo kill' and the get asked my
password. How would I do a 2 step process from 1 perl script?
Thanks again!
Riccardo
-- mailto:[EMAIL PROTECTED] http://www.riccardoperotti.com