HUE安裝完成之后,第一次登錄的用戶就是HUE的超級用戶,可以管理用戶,等等。但是在用的過程發現一個問題這個用戶不能管理HDFS中由supergroup創建的數據。
雖然在HUE中創建的用戶可以管理自己文件夾下面的數據/user/XXX。那么Hadoop superuser的數據怎么管理呢,HUE提供了一個功能就是將Unix的用戶和Hue集成,這樣用Hadoop superuser的用戶登錄到HUE中就能順利的管理數據了。
下面幾個步驟來進行集成
1 確保hadoop 這個用戶組在系統之中
2 運行下面命令
build/env/bin/hue useradmin_sync_with_unix
3 運行完上面的命令,進入到HUE總你就會發現用戶已經集成進來了,但是,沒有密碼,所以需要給Unix的用戶設定密碼和分配用戶組。
4 完成上述步驟之后,登陸進去,就能愉快地管理HDFS數據了。
5 useradmin_sync_with_unix 提供了一些參數。來自官方文檔
- –min-uid – The minimum linux user ID that will be imported (inclusive). The default value is 500.
- –max-uid – The maximum linux user ID that will be imported (exclusive). The default value is 65334.
- –min-gid – The minimum linux group ID that will be imported (inclusive). The default value is 500.
- –max-gid – The maximum linux group ID that will be imported (exclusive). The default value is 65334.
- –check-shell – A boolean flag to see if the users shell is set to /bin/false.
6 確保hadoop用戶組是否存在
getent group | grep hadoop
----------------------------------
參考
http://gethue.com/hadoop-tutorial-how-to-integrate-unix-users-and-groups/
