Configuring sudoers to allow `pptp-command' to run as a Normal User without a password




Enabling a single user

As root run
visudo

Add the following

Cmnd_Alias PPTP = /usr/sbin/pptp-command
jamesm          ALL=(ALL)       ALL, NOPASSWD: PPTP

# This means the user jamesm from ALL hosts can su to (ALL) users and run ALL commands WITH a password but can run /usr/sbin/pptp-command WITHOUT a password


Enabling a list of users or a Unix group

# If you want a group of users to be able to do the same thing define a User_Alias

User_Alias PPTPCONNECT = jamesm, user2, user3, user4

# And use it as the user field

PPTPCONNECT          ALL=(ALL)       ALL, NOPASSWD: PPTP

# or for the unix group of `wheel'

%wheel    ALL=(ALL)       ALL, NOPASSWD: PPTP

Create a wrapper script to run it from the shell prompt by a command similar to these

pptpconnect start

    or

pptpconnect stop


Create a wrapper script to run the sudo command

Download this script and run it in a terminal to create it for you

James McDonald