Link to home
Start Free TrialLog in
Avatar of johnnybaluba
johnnybaluba

asked on

sudo: Ask for password for all commands except one

I'm trying to let my user run one special command using sudo without getting asked for the password. All other commands should prompt for password.

I've tried numerous entries in sudoers but none give me what I want.
user    ALL=(ALL) NOPASSWD: /bin/rpm

will let user run rpm with no password, however the user will no be allowed to run any other commands (using sudo)

I could do chown root /bin/rpm && chmod +s /bin/rpm but I would prefer a sudo solution.
ASKER CERTIFIED SOLUTION
Avatar of nedvis
nedvis
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of johnnybaluba
johnnybaluba

ASKER

Thanks a lot!