Ad Widget

Collapse

Hard-wired username for zabbix_server setuid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smulcahy
    Junior Member
    • Apr 2009
    • 8

    #1

    Hard-wired username for zabbix_server setuid

    Hi,

    From a quick look at the code it looks like the username that zabbix_server setuids to is hardcoded in

    src/libs/zbxnix/daemon.c, line 93

    Can we change this to a configure-time parameter? I may want to install zabbix-server to run as a different username (better yet, a run-time parameter in the config file like other typical unix daemons) but failing that, a parameter I pass during ./configure

    Thanks,

    -stephen
  • Calimero
    Senior Member
    • Nov 2006
    • 481

    #2
    If you don't want to patch zabbix, you can setuid before starting zabbix.

    If zabbix is non-root it won't try to setuid to "zabbix". Hence you could start zabbix using Debian's 'start-stop-daemon' script or a similar script.

    Comment

    • smulcahy
      Junior Member
      • Apr 2009
      • 8

      #3
      Originally posted by Calimero
      If you don't want to patch zabbix, you can setuid before starting zabbix.

      If zabbix is non-root it won't try to setuid to "zabbix". Hence you could start zabbix using Debian's 'start-stop-daemon' script or a similar script.
      Hi,

      Thanks for that. Interestingly I already tried using the start-stop-daemon with the --user option but it still started it as user zabbix. Maybe the --chuid will do the trick.

      Thanks! It would still be nice to have this as a runtime option at some stage in the future (but obviously it's non-urgent).

      -stephen

      Comment

      • Calimero
        Senior Member
        • Nov 2006
        • 481

        #4
        Originally posted by smulcahy
        Thanks for that. Interestingly I already tried using the start-stop-daemon with the --user option but it still started it as user zabbix. Maybe the --chuid will do the trick.
        Indeed. --user tells s-s-d what user the process is expected to run as when checking/killing processes.

        --chuid tells s-s-d to switch user before running the daemon.

        Comment

        Working...