[ale] to sudo or not to sudo

Sparr sparr0 at gmail.com
Thu Jan 26 12:38:19 EST 2012


If your user has permission to sudo sudo then your script can `sudo -u
non-root-user idle bin/ascript.py` at the end.

On Thu, Jan 26, 2012 at 9:53 AM, John Pilman <jcpilman at gmail.com> wrote:
> Gentle Folk
>
> I have a bash script I often run which requires root access, so I
> precede the command with sudo.  It looks like this:
>
> sudo bin/mount_some_network_folders
>
> After that, I usually run a command that does not require root access.
> It looks like this:
>
> idle bin/ascript.py
>
> So I thought, why not append that command to the end of my script and
> save a score of keystrokes.  My question is, can I return back from
> the sudo while inside the bash script before executing that last line?
>
> ...John



More information about the Ale mailing list