Setting up Users from an LDAP Database
About this task
User Admin
directory for
Hue.
The following table shows the parameters you need to set in the ldap
section of the hue.ini
file so you can import users.
WARNING
The hue.ini
file is located at
/opt/mapr/hue/hue-<version>/desktop/conf/.
Parameter | Description | Comments |
---|---|---|
ldap_url
|
The URL of your LDAP server. | |
base_dn
|
Top of the search tree, which defines the search scope. | |
bind_dn
|
Distinguished name (DN) of the user to bind as. | Can be omitted for anonymous searches. |
bind_password
|
Password of the bind user. | Can be omitted for anonymous searches. |
user_filter
|
Limits the scope of the search by applying a filter. | This parameter is optional. |
user_name_attr
|
The attribute used for username in the LDAP schema. | Examples: cn (for common name) or uid (for user
ID). |
To set up Hue users by importing information from an LDAP database:
Procedure
-
Establish communication with the LDAP server by setting the
ldap_url
parameter in theldap
section of thehue.ini
file. Uncomment the line and change the value from the default (ldap://localhost
) to the URL for your LDAP server.# URL of the LDAP server ##ldap_url=ldap://localhost
-
Provide the
base_dn
information to define the search scope. Uncomment the line wherebase_dn
is defined and replace with yourbase_dn
.# The search base for finding users and groups ## base_dn="DC=mycompany,DC=com"
-
If your LDAP server does not support anonymous searches, you need to provide the
bind_dn
andbind_password
. Uncomment the lines with these parameters and change the values to yourbind_dn
and yourbind_password
.# Distinguished name of the user to bind as -- not necessary if the LDAP server # supports anonymous searches ## bind_dn="CN=ServiceAccount,DC=mycompany,DC=com" # Password of the bind user -- not necessary if the LDAP server supports # anonymous searches ## bind_password=
-
If you want to narrow the scope of the directory search, specify a
user_filter
in theusers
section under theldap
section of thehue.ini
file. This is optional.[[[users]]] # Base filter for searching for users ## user_filter="objectclass=*"
-
Set the
user_name_attr
parameter in theusers
section under theldap
section of thehue.ini
file. If your LDAP directory schema does not use the attributesAMAccountName
for the username, uncomment the line and change the value of theuser_name_attr
to the attribute you use. For example, if the directory schema uses theuid
attribute, change the value of the parameter as shown:[[[users]]] # The username attribute in the LDAP schema ## user_name_attr=sAMAccountName
user_name_attr=uid
- Restart httpfs so ldap settings will take effect.
- Restart Hue once all configuration changes have been made so the changes will take effect.