From c1a2a5010eba6abc5f28f4debe4ae8a6278230eb Mon Sep 17 00:00:00 2001 From: twangboy Date: Fri, 31 Mar 2017 14:35:13 -0600 Subject: [PATCH] Set user to 'SYSTEM' for Master to run as Service --- salt/config/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/salt/config/__init__.py b/salt/config/__init__.py index 1925ff4ac9..05aa646b75 100644 --- a/salt/config/__init__.py +++ b/salt/config/__init__.py @@ -66,9 +66,13 @@ if salt.utils.is_windows(): # chance of working. _DFLT_IPC_MODE = 'tcp' _MASTER_TRIES = -1 + # This needs to be SYSTEM in order for salt-master to run as a Service + # Otherwise, it will not respond to CLI calls + _MASTER_USER = 'SYSTEM' else: _DFLT_IPC_MODE = 'ipc' _MASTER_TRIES = 1 + _MASTER_USER = salt.utils.get_user() def _gather_buffer_space(): @@ -1285,7 +1289,7 @@ DEFAULT_MASTER_OPTS = { 'zmq_backlog': 1000, 'pub_hwm': 1000, 'auth_mode': 1, - 'user': salt.utils.get_user(), + 'user': _MASTER_USER, 'worker_threads': 5, 'sock_dir': os.path.join(salt.syspaths.SOCK_DIR, 'master'), 'ret_port': 4506,