ag35 / SEBC_NYC

Coudera Service Enablement BootCamp
0 stars 0 forks source link

HUE Lab: Authenticate using Linux users/groups #11

Closed ag35 closed 8 years ago

ag35 commented 8 years ago
  1. Make sure MySQL is prepared for Hue: show global VARIABLES like 'sql_mode';

Set it if empty: mysql> set global sql_mode=STRICT_ALL_TABLES; Query OK, 0 rows affected (0.00 sec)

Add to /etc/my.cnf file under [mysqld] so that it will stay during next restart

  1. Add Oozie service to cluster, install it
  2. Add hue next
  3. Add HttpFs role to HDFS (if not added before), make sure Hue is pointed to HttpFs and restart the services
ag35 commented 8 years ago

Follow this to import OS users to Hue http://gethue.com/hadoop-tutorial-how-to-integrate-unix-users-and-groups/

ag35 commented 8 years ago

Stuck!!! While trying to export linux users into HUE

export JAVA_HOME=/usr/java/jdk1.7.0_67-cloudera/ /opt/cloudera/parcels/CDH/lib/hue/build/env/bin/hue useradmin_sync_with_unix subprocess.CalledProcessError: Command '/var/run/cloudera-scm-agent/process/423-hue-HUE_SERVER/altscript.sh sec-5-password' returned non-zero exit status 1 [root@ip-172-31-56-250 423-hue-HUE_SERVER]# /var/run/cloudera-scm-agent/process/423-hue-HUE_SERVER/altscript.sh sec-5-password Error: Password not present

export HUE_SECRET_KEY=Cloudera /var/run/cloudera-scm-agent/process/423-hue-HUE_SERVER/altscript.sh sec-5-password

ag35 commented 8 years ago

This is finally solved it!

Directory for the last Hue service startup

export HUE_CONF_DIR="/var/run/cloudera-scm-agent/process/423-hue-HUE_SERVER"

Make sure JAVA_HOME is set, and do not get surprized....

Hue ADMIN password

export HUE_SECRET_KEY=Cloudera

Hue Mysql database password

export HUE_DATABASE_PASSWORD=oozie

Finally

export HUE_IGNORE_PASSWORD_SCRIPT_ERRORS=1

Finally try it

/opt/cloudera/parcels/CDH/lib/hue/build/env/bin/hue useradmin_sync_with_unix

mfernest commented 8 years ago

Nice recovery!

ag35 commented 8 years ago

Thanks, but now we have passwords exposure ...