non - interactive su via batch

February 1, 2010 at 11:16:15
Specs: Windows XP
i am trying to run a batch file on a xp machine that uses plink to run commands on many (6000+) unix boxes.
i want to use the su command so as i can kill processes on the box, but i want the batch file to pass the password to su.
I cant go round and edit the sudo files on every box, is there a solution?

See More: non - interactive su via batch

Report •

February 1, 2010 at 16:18:58
i guess thats a no...

Report •

February 5, 2010 at 01:49:45
Well, if you're so inclined, you could write a script using the perl expect module to batch the SSH sessions.

Something like:

$ssh->waitfor('password:\s*\z', 1)

(copied from the example)

And I think, the first thing you should do w/ this, is install sudo & enable public key authentication.

Report •
Related Solutions

Ask Question