5

I want to edit the sudoers file on my Synology Disk Station (specifically, to enabled password-less shutdown), however my version of Synology DSM does not have visudo installed.

How can I install it so I can safely edit the sudoers file?

4
  • 4
    In case you have a personal user (not just using a default one), you should be able to add configuration files in /etc/sudoers.d/ for your own account without any need for visudo.
    – BulletBob
    Commented Apr 24, 2020 at 6:41
  • 1
    Wow that worked. I put user_name ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdown in /etc/sudoers.d/shutdown and it works. Some sites still recommend using visudo for sudoers.d so I'd still be happy with an answer to the original question.
    – Stoz
    Commented Apr 24, 2020 at 6:53
  • User specific configuration files belong to etc/sudoers.d not in the main sudo config file
    – BulletBob
    Commented Apr 24, 2020 at 6:54
  • 4
    @StrabagISS_Krall I'm mostly worried about bricking my install with an incorrect sudoers file, or incorrect sudoers.d config file. My understanding is that visudo is supposed to check the formatting of the files to prevent you getting locked out with a bad config.
    – Stoz
    Commented Apr 24, 2020 at 6:57

0

You must log in to answer this question.

Browse other questions tagged .