Ad Widget

Collapse

Is User Alias case sensitive?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sun21
    Junior Member
    • Oct 2016
    • 4

    #1

    Is User Alias case sensitive?

    Please help:

    I have LDAP auth in Zabbix, it works.
    I have user "SSs".
    I can login typing SSs and domain password.
    I cannot login typing SSS and domain password.

    It seems that user alias is case sensitive. How to make it case insensitive?

    Serge
  • klaauser
    Junior Member
    • Apr 2016
    • 18

    #2
    Not sure if you ever figured it out, but I just ran into this and was able to hack around it. My specific use case is that all our aliases are in lowercase and so, regardless of input, I want them to be passed to zabbix as lowercase. This isn't necessarily case-insensitivity, but a good workaround for my situation.

    Running Zabbix 3.2.2. Edit the /usr/share/zabbix/index.php file:
    Find this section:
    Code:
    if (isset($_REQUEST['enter']) && $_REQUEST['enter'] == _('Sign in')) {
    	// try to login
    	$autoLogin = getRequest('autologin', 0);
    
    	DBstart();
    	$loginSuccess = CWebUser::login(getRequest('name', ''), getRequest('password', ''));
    	DBend(true);
    and add the strtolower function like below:
    Code:
    if (isset($_REQUEST['enter']) && $_REQUEST['enter'] == _('Sign in')) {
    	// try to login
    	$autoLogin = getRequest('autologin', 0);
    
    	DBstart();
    	[B]$uname = getRequest('name', '');
    	$uname = strtolower($uname);[/B]
    	$loginSuccess = CWebUser::login([B]$uname[/B], getRequest('password', ''));
    	DBend(true);
    Hope this helps!
    Kyle

    Comment

    • Sun21
      Junior Member
      • Oct 2016
      • 4

      #3
      Thanks

      Thanks Kyle,

      Nice workaround. But it will be overwritten by next zabbix update IMHO.

      Serge

      Comment

      Working...