[sudo-users] Giving access to one app for all users

Paul Thompson p_thompson at mac.com
Tue May 16 10:17:08 EDT 2006


   Hi Everyone,

   I apologize if this has been asked before, but I had a look  
through the archives and didn't see anything.  I have a client OS X  
10.4.6 machine that I have created an AppleScript application on.  It  
is designed to replace the printers.conf file in the /etc/cups  
directory.  To be able to do that you need to enter an  
administrator's name and password to run the script.  What I'm trying  
to do is remove that limitation for that one app so that any user,  
whether local or networked, will be able to run that script.  I have  
tried modifying the sudoers file in /etc/.  I have added a command  
alias under the command alias specification for the path to the app,  
and added the line %users  ALL= NOPASSWD: PRINTING under the user  
privilege specification.  I would have thought that would have been  
what I needed, but when I log in as a regular user, it still gives me  
the dialogue box to enter a username and password.  I had a look at  
the man page for sudoers and thought I was on the right track, but  
I'm stuck.  If someone has a moment, could you point me in the right  
direction.  I have included my sudoers file for reference, just in  
case.  The app that I'm referring to lives in /Applications and has  
the permissions of:
-rwxr-xr-x    1 root      admin       13780 Apr 26 10:05 PrintScrip.app


# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers  
file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification
Cmnd_Alias PRINTING = /Applications/PrintScrip.app

# Defaults specification

# Runas alias specification

# User privilege specification
root    ALL=(ALL) ALL
%admin  ALL=(ALL) ALL
%users  ALL= NOPASSWD: PRINTING

# Uncomment to allow people in group wheel to run all commands
# %wheel        ALL=(ALL)       ALL

# Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now
~

   Thank you in advance,

   Paul



More information about the sudo-users mailing list