Re: Running su scripts from bash scripts
"David A. Riggs" <[email protected]>
| Newsgroups | gmane.org.user-groups.linux.morlug |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 2005-06-04 at 19:15 -0400, Michael Bond wrote: > Method 5: > > Use an expects script to handle it asking for a password. > While it's not the perfect fit for Andrei's use, expect can be a very powerful tool for scripting interactive console apps that you'd never believe you'd be able to script. http://expect.nist.gov/ I believe expect comes with an example script named su.exp that scripts using 'su' (though you DO NOT want to store your root password in plaintext in a file, it's just an example), as well as some seriously impressive example scripts. - David A. Riggs <riggs at csee dot wvu dot edu>