ValueError: Unknown password hashing algorithm ''. Did you specify it in the PASSWORD_HASHERS setting?

150 views
Skip to first unread message

Pete Bulman

unread,
Jan 28, 2015, 12:28:31 PM1/28/15
to hue-...@cloudera.org
Hello,

I'm seeing the following error on a CDH5.3.0 parcels install running on CentOS 6.5

I have integrated hue with ldap and have succesfully sync'd some groups and users from windows AD and they are now visible in hue.

when i come to login with one of the users i get the following error and am denied access:

[28/Jan/2015 08:55:08 -0800] base         ERROR    Internal Server Error: /accounts/login/
Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/desktop/core/src/desktop/auth/views.py", line 105, in dt_login
    if auth_form.is_valid():
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/forms/forms.py", line 124, in is_valid
    return self.is_bound and not bool(self.errors)
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/forms/forms.py", line 115, in _get_errors
    self.full_clean()
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/forms/forms.py", line 271, in full_clean
    self._clean_form()
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/forms/forms.py", line 299, in _clean_form
    self.cleaned_data = self.clean()
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/desktop/core/src/desktop/auth/forms.py", line 79, in clean
    return self.authenticate()
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/desktop/core/src/desktop/auth/forms.py", line 52, in authenticate
    return super(AuthenticationForm, self).clean()
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/auth/forms.py", line 167, in clean
    password=password)
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/auth/__init__.py", line 45, in authenticate
    user = backend.authenticate(**credentials)
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/desktop/core/src/desktop/auth/backend.py", line 162, in authenticate
    user = super(AllowFirstUserDjangoBackend, self).authenticate(username, password)
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/auth/backends.py", line 15, in authenticate
    if user.check_password(password):
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/auth/models.py", line 304, in check_password
    return check_password(raw_password, self.password, setter)
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/auth/hashers.py", line 43, in check_password
    hasher = get_hasher(algorithm)
  File "/opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/contrib/auth/hashers.py", line 116, in get_hasher
    "setting?" % algorithm)
ValueError: Unknown password hashing algorithm ''. Did you specify it in the PASSWORD_HASHERS setting?


any suggestions on how to resolve gratefully received.

thanks
Pete

Romain Rigaux

unread,
Jan 28, 2015, 7:36:04 PM1/28/15
to Pete Bulman, Hue-Users
If you imported the users, you will also need to set their password in Hue:
If you want to just re-use the LDAP passwords and not store any of those in Hue, you should then switch to the LDAP Backend:
http://gethue.com/making-hadoop-accessible-to-your-employees-with-ldap/#t1

Romain

To unsubscribe from this group and stop receiving emails from it, send an email to hue-user+u...@cloudera.org.

Pete Bulman

unread,
Jan 29, 2015, 5:01:20 AM1/29/15
to hue-...@cloudera.org
hi Romain,

thanks for the response.

I have now set the backend to ldap, but receive the following error - i have verified the username and password on ad.
 Error!
  • Invalid username or password.

the (anonymised) hue config i'm using:
[desktop]
[[auth]] 
backend=desktop.auth.backend.LdapBackend
[[ldap]]
ldap_url=LDAP://myhost.mydomain.net
search_bind_authentication=true
nt_domain=mydomain.net
ldap_username_pattern="uid=<username>,ou=Users,dc=mydomain.net,dc=net"
base_dn="DC=mydomain,DC=net"
bind_dn="CN=Atlantis,CN=Users,DC=mydomain,DC=net"
bind_password=mypasswd
[[[users]]]
user_filter="objectclass=*"
user_name_attr=sAMAccountName
[[[groups]]]
group_filter="objectclass=*"
group_name_attr=cn

and the errors I see are:

error.log
[29/Jan/2015 01:52:21 -0800] config       ERROR    search_s('DC=mydomain,DC=net', 2, '(&(sAMAccountName=test456)(objectclass=*))') raised OPERATIONS_ERROR({'info': '000004DC: LdapErr: DSID-0C090728, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v2580', 'desc': 'Operations error'},)

access.log
[29/Jan/2015 01:52:21 -0800] DEBUG    149.195.61.125 -anon- - "POST /accounts/login/ HTTP/1.0"
[29/Jan/2015 01:52:21 -0800] WARNING  149.195.61.125 -anon- - "POST /accounts/login/ HTTP/1.0" -- Failed login for user "test456"

runcpserver.log
[29/Jan/2015 01:52:21 -0800] config       ERROR    search_s('DC=bpatlantis,DC=net', 2, '(&(sAMAccountName=test456)(objectclass=*))') raised OPERATIONS_ERROR({'info': '000004DC: LdapErr: DSID-0C090728, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v2580', 'desc': 'Operations error'},)
[29/Jan/2015 01:52:21 -0800] access       WARNING  149.195.61.125 -anon- - "POST /accounts/login/ HTTP/1.0" -- Failed login for user "test456"


to confirm, prior to setting the backend to ldap (i.e. settings all as above but with backend=desktop.auth.backend.AllowFirstUserDjangoBackend) I was able to add this user (test456) from ldap and sync the user/group.

is there anything further you would suggest?

thanks again
Pete

Pete Bulman

unread,
Feb 3, 2015, 3:37:56 AM2/3/15
to hue-...@cloudera.org
hello,

further to the previous posts, I have now run a hue db sync and merge (DatabaseError: no such table: documentpermission_users)

however I'm still seeing the following errors when attempting to authenticate a user with AD credentials:

--------------------------------------------
access.log
[03/Feb/2015 00:15:45 -0800] INFO     149.195.61.125 -anon- - "GET / HTTP/1.0" -- login redirection
[03/Feb/2015 00:15:45 -0800] DEBUG    149.195.61.125 -anon- - "GET /accounts/login/ HTTP/1.0"
[03/Feb/2015 00:15:47 -0800] DEBUG    149.195.61.125 -anon- - "GET /static/ext/fonts/fontawesome-webfont.woff HTTP/1.0"
[03/Feb/2015 00:16:06 -0800] DEBUG    149.195.61.125 -anon- - "POST /accounts/login/ HTTP/1.0"
[03/Feb/2015 00:16:06 -0800] WARNING  149.195.61.125 -anon- - "POST /accounts/login/ HTTP/1.0" -- Failed login for user "test_user"


runcpserver.log
[03/Feb/2015 08:15:21 ] settings     INFO     Welcome to Hue 3.7.0
[03/Feb/2015 00:15:22 -0800] __init__     WARNING  Couldn't import snappy. Support for snappy compression disabled.
[03/Feb/2015 00:15:23 -0800] settings     INFO     Welcome to Hue 3.7.0
[03/Feb/2015 00:15:24 -0800] __init__     WARNING  Couldn't import snappy. Support for snappy compression disabled.
[03/Feb/2015 00:15:45 -0800] middleware   WARNING  Failed to import tidylib (for debugging). Is libtidy installed?
[03/Feb/2015 00:15:45 -0800] middleware   INFO     Unloading DatabaseLoggingMiddleware
[03/Feb/2015 00:15:45 -0800] middleware   INFO     Unloading AuditLoggingMiddleware
[03/Feb/2015 00:15:45 -0800] middleware   INFO     Unloading SpnegoMiddleware
[03/Feb/2015 00:15:45 -0800] middleware   INFO     Unloading HueRemoteUserMiddleware
[03/Feb/2015 00:15:45 -0800] middleware   INFO     Redirecting to login page: /
[03/Feb/2015 00:15:45 -0800] access       INFO     149.195.61.125 -anon- - "GET / HTTP/1.0" -- login redirection
[03/Feb/2015 00:16:06 -0800] config       ERROR    search_s('DC=mydomain,DC=net', 2, '(&(sAMAccountName=test_user)(objectclass=*))') raised OPERATIONS_ERROR({'info': '000004DC: LdapErr: DSID-0C090728, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v2580', 'desc': 'Operations error'},)
[03/Feb/2015 00:16:06 -0800] access       WARNING  149.195.61.125 -anon- - "POST /accounts/login/ HTTP/1.0" -- Failed login for user "test_user"



error.log
[03/Feb/2015 00:19:32 -0800] config       ERROR    search_s('DC=mydomain,DC=net', 2, '(&(sAMAccountName=test_user)(objectclass=*))') raised OPERATIONS_ERROR({'info': '000004DC: LdapErr: DSID-0C090728, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v2580', 'desc': 'Operations error'},)
--------------------------------------------

any help much appreciated

thanks
Pete

On Wednesday, January 28, 2015 at 5:28:31 PM UTC, Pete Bulman wrote:

meir

unread,
Jan 17, 2017, 6:39:20 AM1/17/17
to Hue-Users
Hello Pete,
I am getting the exact same error message. 
Have you solved this issue? what was it?
Thanks
Reply all
Reply to author
Forward
0 new messages