From: Rick DeNatale Date: 2006-09-09T01:24:59+09:00 Subject: Re: Ruby + SSH + Sudo On 9/7/06, Matt Rose wrote: > there is a way to pass the password in using sudo. I forget the > syntax but the man page should have it. If you're still curious > tomorrow, I'll dig up some code I wrote to do exactly this. FWIW, I can't for the life of me find any options in man sudo (on an Ubuntu Dapper) which allows the password to be given as an arg. The only possibility might the the -a option -a The -a (authentication type) option causes sudo to use the specified authentication type when validating the user, as allowed by /etc/login.conf. The system administrator may specify a list of sudo-specific authentication methods by adding an "auth-sudo" entry in /etc/login.conf. This option is only available on systems that support BSD authentication where sudo has been configured with the --with-bsdauth option. This MAY allow it but it seems to require a specific system configuration. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/