Created on 05-12-2015 02:47 AM - edited 09-16-2022 02:28 AM
Hi,
We have recently updated cluster to CDH 5.3.3. We have migrated hue database to external Postgres version 9.2. We enabled security with sentry. Also we have changed mode of authentication in hue to desktop.auth.backend.PamBackend. After these, changes, ldap users are able to login and everything works fine. But no more superusers in hue.
Please let me know the steps to re-enable superuser status for admin users and normal users.
Regards,
Jibin
Created 05-12-2015 05:36 AM
You can do the following:
1. Spawn the Hue shell:
export HUE_CONF_DIR="/var/run/cloudera-scm-agent/process/`ls -alrt /var/run/cloudera-scm-agent/process | grep HUE | tail -1 | awk '{print $9}'`" cd /opt/cloudera/parcels/CDH/lib/hue (or /usr/lib/hue if using packages) ./build/env/bin/hue shell
2. Paste the following python in the shell replacing <username> with the user you want to become superuser:
from django.contrib.auth.models import User a = User.objects.get(username='<username>') a.is_staff = True a.is_superuser = True a.save()
Created 05-12-2015 05:36 AM
You can do the following:
1. Spawn the Hue shell:
export HUE_CONF_DIR="/var/run/cloudera-scm-agent/process/`ls -alrt /var/run/cloudera-scm-agent/process | grep HUE | tail -1 | awk '{print $9}'`" cd /opt/cloudera/parcels/CDH/lib/hue (or /usr/lib/hue if using packages) ./build/env/bin/hue shell
2. Paste the following python in the shell replacing <username> with the user you want to become superuser:
from django.contrib.auth.models import User a = User.objects.get(username='<username>') a.is_staff = True a.is_superuser = True a.save()