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.In reply to Re: simple automated login
by jdalbec
in thread simple automated login
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |