Finding the list of Hue superusers
You can fetch the list of superusers by using the Hue shell with Python code or by
running a SQL query on the auth_user
table.
Using the Hue shell and Python code to find Hue superusers
- Connecting to Hue shell by running the following
command:
/opt/cloudera/parcels/CDH/lib/hue/build/env/bin/hue shell --cm-managed
- Enter the Python code as
follows:
from django.contrib.auth.models import User print "%s" % User.objects.filter(is_superuser = True)
Sample output:<QuerySet [<User: admin>]>
Runing a SQL query on the auth_user table to find Hue superusers
- Connect to Hue database shell by running the following
command:
/opt/cloudera/parcels/CDH/lib/hue/build/env/bin/hue dbshell --cm-managed
- Run the following SQL
query:
select username, is_superuser from auth_user where is_superuser=1;
Sample output:----------------------+ username is_superuser ----------------------+ admin 1 ----------------------+ 1 row in set (0.00 sec)