SysAdmin

Allow a user to run specific sudo command only

JJ
Jobin Joseph · Founder and CEO
·Published 6 March 2015·1 min read

Issue

Versions

Solution

mydeveloper ALL=(ALL) NOPASSWD: /etc/init.d/httpd *

Note

If you want to give the same access to a group of people,

gpasswd -a dev1 mydevelopergroup
gpasswd -a dev2 mydevelopergroup 
gpasswd -a dev3 mydevelopergroup 
%mydevelopergroup ALL=(ALL) NOPASSWD: /etc/init.d/httpd *

Like / share / + / Tweat if found helpfull 🙂

Jobin Joseph
Jobin Joseph, Founder and CEO
5x AWS Certified, ISO 27001:2022 Lead Implementer, 17+ years building cloud infrastructure for regulated industries.
About Jobin →

Reading this because your AWS bill or uptime is a problem?

30 minutes, direct with the founder, no sales pitch: one specific recommendation for your AWS workload.

Book a free 30-minute review
30 min Free Consultation →