Removing the need for the zato user to have sudo

Hey there!

So when installing from sources there is a point in which you clone the repository and execute the installation script. Say something similar to this:

sudo su - zato
git clone https://github.com/zatosource/zato
cd zato
./code/install.sh -p python3

I am on Ubuntu 18.04 and, as far as I’ve detected, the installation script requires sudo for the following purposes:

  1. code/install.sh:30 updates packages and install the Python base package.
  2. code/_install-deb.sh:9 updates packages.
  3. code/_install-deb.sh:12 installs the package lsb-release if missing.
  4. code/_install-deb.sh:18 to 22 adds the backports repository if we’re running Debian 7
  5. code/_install-deb.sh:24 installs the dependencies.

As far as I’ve been able to see, similar commands are executed for other distributions.

My question would be whether you think that it would be worth checking for these packages to be already present so that the zato user would not need sudo permissions. That is, in case later on sudo is not required to start some services, perform certain maintenance routines, etc.

Thanks in advance.

Hello @jsabater,

when you install Zato from source, you can do it under any user, it does not have to be zato. You can just do it under your own username which likely already has sudo.

As for what sudo is needed for, it is only for installation so you if you do not need it afterwards, you can just remove a particular user from sudoers.

I would not change the installation process - it works, it is stable, and I would prefer only to add support for new systems to it (RHEL 8, Debian 10 etc.) but not to change how it works internally.

Hi, @dsuch!

I understand you wouldn’t want to touch the installation process, being stable and bug-free, so I’ll go for removing sudo permissions from the zato user after the installtion and we’ll see in the future :slight_smile:

Thanks for your answer.