Bug 186298 - net-mgmt/zabbix22-agent UserParameter not working
Summary: net-mgmt/zabbix22-agent UserParameter not working
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Kubilay Kocak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-31 12:40 UTC by Felix Ehlers
Modified: 2014-02-01 01:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Ehlers 2014-01-31 12:40:00 UTC
Using the UserParameter configuration setting in zabbix_agentd.conf leads zabbix server to display "not supported". The reason is that the local command will be run through /bin/sh according to the official zabbix documentation. Because the FreeBSD port has the shell nologin, it will not work.

Fix: 

Update the zabbix user to have a valid home directory and shell.
How-To-Repeat: Create a UserParameter like this: UserParameter=myparam,/usr/bin/id then restart zabbix agent, create an item for a host and use myparam as check.
Comment 1 dfilter service freebsd_committer 2014-01-31 13:23:57 UTC
Author: koobs
Date: Fri Jan 31 13:23:40 2014
New Revision: 341991
URL: http://svnweb.freebsd.org/changeset/ports/341991
QAT: https://qat.redports.org/buildarchive/r341991/

Log:
  UIDs: Use /bin/sh shell for Zabbix to fix UserParameters
  
  Zabbix uses /bin/sh as a command line interpreter under UNIX operating systems
  for commands run via the UserParameters feature [1]
  
  Adjust the login shell for the zabbix user in UIDs to allow them to function.
  
  [1] http://www.zabbix.com/documentation/2.2/manual/config/items/userparameters
  
  PR:		ports/186298
  Submitted by:	Felix Ehlers <felix-freebsd@fleximus.de>

Modified:
  head/UIDs

Modified: head/UIDs
==============================================================================
--- head/UIDs	Fri Jan 31 12:49:14 2014	(r341990)
+++ head/UIDs	Fri Jan 31 13:23:40 2014	(r341991)
@@ -65,7 +65,7 @@ ircproxyd:*:118:118::0:0:Night Light IRC
 mythtv:*:119:119::0:0:MythTV pseudo-user:/nonexistent:/bin/sh
 pdns_recursor:*:120:120::0:0:pdns_recursor pseudo-user:/nonexistent:/usr/sbin/nologin
 otrs:*:121:121::0:0:OTRS Administrator:/usr/local/otrs:/bin/csh
-zabbix:*:122:122::0:0:Zabbix NMS:/nonexistent:/usr/sbin/nologin
+zabbix:*:122:122::0:0:Zabbix NMS:/nonexistent:/bin/sh
 _ntp:*:123:123::0:0:NTP Daemon:/var/empty:/usr/sbin/nologin
 fetchmail:*:124:124::0:0:Fetchmail mail-retrieval daemon:/nonexistent:/usr/sbin/nologin
 postfix:*:125:125::0:0:Postfix Mail System:/var/spool/postfix:/usr/sbin/nologin
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2014-01-31 13:24:51 UTC
Responsible Changed
From-To: freebsd-ports-bugs->koobs

I'll take it.
Comment 3 Edwin Groothuis freebsd_committer 2014-01-31 23:36:17 UTC
Maintainer of net-mgmt/zabbix22-agent,

Please note that PR ports/186298 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/186298

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 4 Edwin Groothuis freebsd_committer 2014-01-31 23:36:18 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 5 dfilter service freebsd_committer 2014-02-01 00:57:59 UTC
Author: koobs
Date: Sat Feb  1 00:57:50 2014
New Revision: 342094
URL: http://svnweb.freebsd.org/changeset/ports/342094
QAT: https://qat.redports.org/buildarchive/r342094/

Log:
  Add UPDATING entry for zabbix UIDs change and bump ports
  
  PR:		ports/186298
  Reviewed by:	mat

Modified:
  head/UPDATING
  head/net-mgmt/zabbix2-server/Makefile
  head/net-mgmt/zabbix22-server/Makefile

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Fri Jan 31 23:19:22 2014	(r342093)
+++ head/UPDATING	Sat Feb  1 00:57:50 2014	(r342094)
@@ -5,6 +5,18 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20140201:
+  AFFECTS: users of net-mgmt/zabbix*
+  AUTHOR: koobs@FreeBSD.org
+
+  The login shell for the zabbix user in UIDs was changed from
+  /usr/sbin/nologin to /bin/sh to fix the zabbix-agent UserParameter
+  feature.
+
+  To update the existing user on your system, run:
+
+  # pw usermod zabbix -s /bin/sh  
+ 
 20140114:
   AFFECTS: users of www/mod_authnz_external
   AUTHOR: ohauer@FreeBSD.org

Modified: head/net-mgmt/zabbix2-server/Makefile
==============================================================================
--- head/net-mgmt/zabbix2-server/Makefile	Fri Jan 31 23:19:22 2014	(r342093)
+++ head/net-mgmt/zabbix2-server/Makefile	Sat Feb  1 00:57:50 2014	(r342094)
@@ -3,7 +3,7 @@
 
 PORTNAME=	zabbix2
 PORTVERSION=	2.0.10
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES=	net-mgmt
 MASTER_SITES=	SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
 PKGNAMESUFFIX?=	-server

Modified: head/net-mgmt/zabbix22-server/Makefile
==============================================================================
--- head/net-mgmt/zabbix22-server/Makefile	Fri Jan 31 23:19:22 2014	(r342093)
+++ head/net-mgmt/zabbix22-server/Makefile	Sat Feb  1 00:57:50 2014	(r342094)
@@ -3,7 +3,7 @@
 
 PORTNAME=	zabbix22
 PORTVERSION=	2.2.1
-PORTREVISION?=	1
+PORTREVISION?=	2
 CATEGORIES=	net-mgmt
 MASTER_SITES=	SF/zabbix/ZABBIX%20Latest%20Stable/${PORTVERSION}
 PKGNAMESUFFIX?=	-server
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2014-02-01 01:02:07 UTC
State Changed
From-To: feedback->closed

Committed, thanks for your submission Felix!