Domino on Linux/Unix, Troubleshooting, Best Practices, Tips and more ...

sudo for Domino start script

Daniel Nashed  31 May 2019 14:20:47

I wasn't aware that so many people are using "sudo" in combination with my start script.
On my machine I am using it for quite a while long before systemd support.
SLES allowed to start the server without root permissions but for CentOS/RHEL we always needed root also with init.d to start or restart a service.

With systemd we need root permissions on RHEL, CentOS and SLES.

I am currently invoking the rc_domino script wth sudo. But that means the rc_domino is running technically as root.

The better idea sounds like we allow the notes user to just use systemctl to start/stop/restart the domino.service.

The rc_domino script could be configured to use sudo. But that means we have to still make it configurable, because not everyone is using sudo.

IMHO allowing notes to use systemctl is the cleaner way.  The rc_domino script will figure out which operation is requested and invoke just the systemctl related commands via sudo.
rc_domino currently doesn't read the config file. But I could source it and check a parameter to check if sudo should be used.

Based on the feedback I tend to enable it by defaut.

But configuring sudo to allow systemctl should be a manual step (I can print what to do when the install script ran).

So here would be what I would allow by sudo if I implement it that way:


-- snip --

%notes ALL=/bin/systemctl start domino
%notes ALL=/bin/systemctl stop domino
%notes ALL=/bin/systemctl status domino
%notes ALL=/bin/systemctl enable domino
%notes ALL=/bin/systemctl disable domino

-- snip --

What do you think?

-- Daniel

Archives


  • [IBM Lotus Domino]
  • [Domino on Linux]
  • [Nash!Com]
  • [Daniel Nashed]