GMorgan wrote:Will that second option keep the script running as root or will all subsequent commands be run as fred. Personally I'd prefer to avoid NOPASSWDing it.
MartyBartfast wrote:Another trick you can do if you want user fred to run something as bert without knowing bert's password is as fred do
sudo su - bert -c "some command"
and then have an appropriate entry in /etc/sudoers
sudo -u bert some command
Users browsing this forum: No registered users and 3 guests