lundi 8 décembre 2014

How to run the script that requires root acccess as a regular user without adding that user to sudoers?


I have an account with root privileges and need to run the install script for a specific user. I don't want/can't analyse the script upfront to figure out the list of all other packages it is going to run or directories it's going to write that require root access.


I realise the workaround is to temporarily take over that account and:



1) add <regular_user> to sudoers
2) su <regular_user>
3) run install script
4) exit (su)
5) remove <regular_user> from sudoers


is there any, more elegant way to do this, something like running one-off command as but with root permissions that I have?



Aucun commentaire:

Enregistrer un commentaire