Salt Systemd managed by user instead of root

77 views
Skip to first unread message

Sri

unread,
Jun 17, 2021, 5:09:32 PM6/17/21
to Salt-users
Hello,

I need to manage the services on a node for a particular user instead of root user. Is there a way to use "service" module to use a user.

E.g:
openvpn
  service.running
   - enable: True
   - user: foo

Phipps, Thomas

unread,
Jun 17, 2021, 5:26:27 PM6/17/21
to salt-...@googlegroups.com
Sri, I'm guessing you are talking about systemd's --user setting. if so salt does not have anything currently to use within its systems service file. so no, service can not take a user setting. 

you will need to use cmd.run if you are talking about running system commands as a user directly that also is no and again cmd.run with runas would need to be used.

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/0bb049b4-5308-4e86-a91a-254ed23429d3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages