Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Incomplete
-
Affects Version/s: 4.7.0
-
Fix Version/s: None
-
Component/s: core.users
-
Labels:None
-
Easy:Easy
Description
I have Hue configured to use LDAP authentication, and Hue tries to create home directory for users on first login.
It works but home directory becomes created owned by cluster-admin rather than by user, which I'm trying to log in.
This is because Hue creates /user/<username> directory as cluster-admin and than performs the following operation which fails:
self.chown("/user/<username>", user, user)
It fails because in our environment with LDAP we have no groups named the same as usernames (and It's not guaranteed that those groups would exists on environment with PAM also).
So my proposition is to replace that line with the following:
self.chown(home_path, user) try: self.chown(home_path, group=user) catch IOError: LOG.error(...
So UID of home directory always would be set properly, while GID would be configured only when it's possible.