[CentOS] OT: Scripting with sudo password

Thu Nov 15 02:47:54 UTC 2007
thad <thad.mailist at gmail.com>

You can use expect man expect.  You can also export ssh key of regular
user to do remote then su to root put everything on expect.


On 11/14/07, James A. Peltier <jpeltier at cs.sfu.ca> wrote:
> Completely off topic, but I'm sure someone out there is using scripts
> that require a sudo password of some sort, so I'll ask.
>
> What are people doing to automate tasks that required sudo passwords in
> order to run?  sudo without a password is not an option for me, but I
> would like to be able to enter the password once have it saved and then
> read back when sudo is required.
>
> something like
>
> run_on_all_hosts perform_sudo_command
> script prompts for password
> script lauches on all hosts and passes password when required.
>
> Any examples?
>
> --
> 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
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>


-- 
sometimes truth is stranger than fiction
-bad religion-
http://www.bloglines.com/blog/mailist