Supressing password request from 'sudo'

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Sun Apr 3 17:19:53 UTC 2005


Hi all,

   Minor question; How can I surpress the password prompt from 'sudo' 
entirely?

   I have a perl program that calls 'sudo'. I first call it with '|sudo 
-S -v -p %' (using the pipe at the start to let me pass the password). 
Once the timestamp is set I close that instance of 'sudo' and then use 
it to execute whatever priviledged program I need: 'sudo <executable> 
<switches> 2>&1 |'.

   The problem is that when '|sudo...' is called it's output, a password 
prompt, gets printed to the screen which I can see both when I run my 
script from the command line or via a web browser. I added the '-p %' to 
reduce the prompt to a simple '%\n' which at least doesn't show 
obviously what's being asked. Ideally though I would like 'sudo' to not 
prompt for the password at all.

Thanks all!

Madison

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Madison Kelly (Digimer)
TLE-BU, The Linux Experience; Back Up
http://tle-bu.thelinuxexperience.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list