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?

Stoz
  • 151
  • 1
  • 5
  • 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 Apr 24 '20 at 06: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 Apr 24 '20 at 06:53
  • User specific configuration files belong to `etc/sudoers.d` not in the main `sudo` config file – BulletBob Apr 24 '20 at 06: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 Apr 24 '20 at 06:57

0 Answers0