2011-09-30, 17:28
hi there, I created a small fool-proof script for my friend to start and stop the hamachi service via the program menu instead of typing a bunch of lines.
I developped the script on a linux with xbmc installed on it so the sudoers config is not the same as the xbmc live one so I added what it was missing to achieve the same result but I'm pretty sure I added too much for nothing and I don't want him to have security risk or him to have too much privilege since he doesn't know anything about linux and XBMC. Here's the etc/sudoers config:
I developped the script on a linux with xbmc installed on it so the sudoers config is not the same as the xbmc live one so I added what it was missing to achieve the same result but I'm pretty sure I added too much for nothing and I don't want him to have security risk or him to have too much privilege since he doesn't know anything about linux and XBMC. Here's the etc/sudoers config:
Code:
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command after they have
# provided their password
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL:ALL) ALL
#
#includedir /etc/sudoers.d
# Members of the admin group may gain root privileges
%admin ALL=NOPASSWD: ALL
### XBMC-specific configuration ###
# XBMC
Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/reboot, /sbin/halt # XBMC
Cmnd_Alias MOUNT_CMDS = /bin/mount, /bin/umount # XBMC
xbmc ALL=(ALL) ALL # XBMC
xbmc ALL=NOPASSWD: SHUTDOWN_CMDS, MOUNT_CMDS, /usr/bin/hamachi-init, /usr/bin/hamachi, /sbin/tuncfg
root ALL=NOPASSWD: /usr/bin/hamachi-init, /usr/bin/hamachi, /sbin/tuncfg