[ale] to sudo or not to sudo

leam hall leamhall at gmail.com
Thu Jan 26 09:58:46 EST 2012


John,


I think so, but try it. write the script with a sudo, and then a line
afterwards  "touch /tmp/myfile". See who owns /tmp/myfile.

Leam

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
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



-- 
Mind on a Mission <http://leamhall.blogspot.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20120126/aa51d437/attachment-0001.html 


More information about the Ale mailing list