in reply to simple automated login
If your script is setuid, then you don't have to request a root password since you can regain root privileges after dropping them just by re-exec'ing your script. It's generally a good idea to drop root privileges any time you don't need them by $)=$(; $>=$<;.
If you're using "su" you'll need to use Expect or Expect::Simple to feed the password to the "su" command.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: simple automated login
by Fletch (Bishop) on Aug 31, 2004 at 02:39 UTC | |
|
Re^2: simple automated login
by Anonymous Monk on Sep 01, 2004 at 15:36 UTC |