Leo Alekseyev <dnqu...@gmail.com> wrote: > I was wondering if there was an easy way to execute some shell > commands contained in a src block as root. Alternatively, is there a > quick way to export _just_ that one source block to a temp file so > that I could run it as root manually? >
You could set up sudo so that it does not require a password and prefix each command that needs to be run as root with "sudo": --8<---------------cut here---------------start------------->8--- * foo #+BEGIN_SRC sh sudo id #+END_SRC #+RESULTS: : uid=0(root) gid=0(root) groups=0(root) --8<---------------cut here---------------end--------------->8--- Not sure how sudo would interact with babel if you had to type in a password. Nick