[CentOS] OT: Scripting with sudo password

Thu Nov 15 01:14:38 UTC 2007
James A. Peltier <jpeltier at cs.sfu.ca>

James A. Peltier wrote:
> gjgowey at tmo.blackberry.net wrote:
>> How about using ssh with certificate authenitication instead of sudo?
>>
> That's great for SSH, I already do that, but if I ssh to a system and 
> then type sudo it prompts me for a password.  I want something like this
> 
> ssh_and_sudo_on_all_hosts
> this script prompts for passwords and provides passwords to all ssh or 
> sudo sessions
> 
> ssh => some_host
> uses keys/certificates whatever so no password
> 
> sudo do_some_command (prompts for password)
> password entered at start of ssh_and_sudo_on_all_hosts is passed to sudo 
> and sudo runs.
> 

Sorry, I keep using sudo as an example, please consider it substituted 
for anything that requires a password.

-- 
James A. Peltier
Technical Director, RHCE
SCIRF | GrUVi @ Simon Fraser University - Burnaby Campus
Phone   : 778-782-3610
Fax     : 778-782-3045
Mobile  : 778-840-6434
E-Mail  : jpeltier at cs.sfu.ca
Website : http://gruvi.cs.sfu.ca | http://scirf.cs.sfu.ca
MSN     : subatomic_spam at hotmail.com