Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Arrgghh it's that pointless sudo su again Commented Jun 3, 2017 at 21:45
  • Pointless, but it works. Now perhaps if aside from bashing (see what I did there?) my answer you also contributed a solution to the issue at hand... Commented Jun 3, 2017 at 22:28
  • If you put the commands source ~/.bash_rc; echo $PATH in a script named /tmp/foo.sh, you can do this: sudo -i -u ${USER_NAME} /tmp/foo.sh Commented Jun 3, 2017 at 22:37