Support Questions

Find answers, ask questions, and share your expertise

can't change password for hue user

avatar
Explorer

Hello,

 

I have the following problem: I have a Hue account and I can not login. The password does not work anymore (although I never changed it). Now I wanted to change my password (/..../hue/build/env/bin/hue changepassword), but unfortunately it does not work. Can someone possibly help me? 

 

 

I have tried the following:

  • HUE_CONF_DIR=/var/run/cloudera-scm-agent/process/1360-hue-HUE_SERVER
  • echo $HUE_CONF_DIR
  • export HUE_CONF_DIR

 

Next, I execute the password-change command:

  • /opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/bin/hue changepassword
  • Here I get following message: IOError: [Errno 13] Permission denied: '/var/run/cloudera-scm-agent/process/logs/changepassword.log'

 

I execute the same command but with sudo:

  • I get following message:
    • ALERT: This appears to be a CM Managed environment
    • ALERT: HUE_CONF_DIR must be set when running hue commands in CM Managed environment
    • ALERT: Please run 'hue <command> --cm-managed'
  • Below the message I get also this:
    • File "/opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/sqlite3/base.py", line 347, in get_new_connection
    • conn = Database.connect(**conn_params)
    • db.utils.OperationalError: unable to open database file

 

I have already tried a new account (createsuperuser), but it does not work. Is there anything else I can do? Or am

 

I generally doing something wrong? I'm grateful for any help!

1 REPLY 1

avatar
Guru

Hi @yellowD,

 

From the output, it looks like you are using CDH5.15.1. Please confirm if it is not.

 

Starting from CDH 5.12.2, 5.13.1, or later versions of CDH, it is no longer necessary to export the HUE_CONF_DIR, HUE_DATABASE_PASSWORD, and HUE_IGNORE_PASSWORD_SCRIPT_ERRORS environment variables.

 

Instead, from the Hue sever, run the following as the root user (due to security settings of CM process directories):

/opt/cloudera/parcels/CDH/lib/hue/build/env/bin/hue changepassword <USER-TO-CHANGE> --cm-managed

So if you want to change the password for user named "admin", then run the command like this:

/opt/cloudera/parcels/CDH/lib/hue/build/env/bin/hue changepassword admin --cm-managed

 

See my test result below:

# /opt/cloudera/parcels/CDH/lib/hue/build/env/bin/hue changepassword admin --cm-managed
Changing password for user 'admin'
Password:
Password (again):
Password changed successfully for user 'admin'

Thanks and hope this helps,

Li

 

Li Wang, Technical Solution Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

Terms of Service

Community Guidelines

How to use the forum