Created
March 10, 2014 18:51
-
-
Save rsdy/9471688 to your computer and use it in GitHub Desktop.
invoke yaourt as a dedicated user with sudo rights
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# append to /etc/sudoers | |
# | |
yaourt ALL=(root) NOPASSWD: /usr/bin/pacman, /usr/bin/pacdiffviewer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place in ~/bin/yaourt | |
# `su -l` executes the command in a login shell, clean env variables | |
# | |
mount -o remount,exec /tmp | |
su -l yaourt -c "EDITOR=vim yaourt $@" | |
mount -o remount,noexec /tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment