2015-08-31 22:59:05 +02:00
|
|
|
Salt-master as non-root user
|
|
|
|
============================
|
|
|
|
|
2015-10-19 22:52:40 +02:00
|
|
|
With this version of salt the salt-master will run as salt user.
|
2015-08-31 22:59:05 +02:00
|
|
|
|
|
|
|
Why an extra user
|
|
|
|
=================
|
|
|
|
|
|
|
|
While the current setup runs the master as root user, this is considered a security issue
|
|
|
|
and not in line with the other configuration management tools (eg. puppet) which runs as a
|
|
|
|
dedicated user.
|
|
|
|
|
2015-10-19 22:52:40 +02:00
|
|
|
How can I undo the change
|
2015-08-31 22:59:05 +02:00
|
|
|
=========================
|
|
|
|
|
|
|
|
If you would like to make the change before you can do the following steps manually:
|
2015-10-19 22:52:40 +02:00
|
|
|
1. change the user parameter in the master configuration
|
|
|
|
user: root
|
2015-08-31 22:59:05 +02:00
|
|
|
2. update the file permissions:
|
2015-10-19 22:52:40 +02:00
|
|
|
as root: chown -R root /etc/salt /var/cache/salt /var/log/salt /var/run/salt
|
2015-08-31 22:59:05 +02:00
|
|
|
3. restart the salt-master daemon:
|
|
|
|
as root: rcsalt-master restart or systemctl restart salt-master
|
|
|
|
|
|
|
|
NOTE
|
|
|
|
====
|
|
|
|
|
2015-10-19 22:52:40 +02:00
|
|
|
Running the salt-master daemon as a root user is considers by some a security risk, but
|
|
|
|
running as root, enables the pam external auth system, as this system needs root access to check authentication.
|
2015-08-31 22:59:05 +02:00
|
|
|
|
|
|
|
For more information:
|
|
|
|
http://docs.saltstack.com/en/latest/ref/configuration/nonroot.html
|