Setting Up SUDO


You want to allow a user to run one command, as root user.


To allow a user access to run stuff as root, just login as root and then add the following line to /etc/sudoers.

userid hostname=command


For example to allow user marcus access on bree, to restart, stop, start or check apache:

marcus bree=/etc/init.d/httpd

To allow all access on all boxes:

marcus (ALL)=(ALL)


[tags]sudo, switch user do, temporary UNIX authorisation, Unix Coding School[/tags]

Previous Post

Leave a Reply

Your email address will not be published. Required fields are marked *