[mythtv-users] Sudoers quandry

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Oct 7 06:39:05 UTC 2015


On Tue, 6 Oct 2015 21:29:13 -0400, you wrote:

>My new installation of Mythbuntu (a  LIVA ECS X) is not letting me grant
>elevated privileges to shutdown from the mythtv group.
>
>Any idea why this line in /etc/sudoers is not letting  my user accounts
>shut the box down?
>
>%mythtv localhost=(ALL) NOPASSWD:
>/sbin/shutdown,/sbin/halt,/sbin/reboot,/usr/bin/setwakeup.sh,/usr/bin/mythshutdown

When I had a problem like that, it was permissions - the allowed
permissions on sudoers files are very strict.  It would have to have
had write permission to be edited, but you have to change it back to
read-only or it will be ignored.  This is what is needed:

  chown root:root /etc/sudoers
  chmod u=r,g=r,o= /etc/sudoers

Also, it is better to add things like that in a new file in the
/etc/sudoers.d directory rather than putting them directly into
/etc/sudoers.

If you read the comments at the top of the /etc/sudoers file, it tells
you that you should use visudo as root to edit sudo files, as that
handles the permissions properly.


More information about the mythtv-users mailing list