ondemand icon indicating copy to clipboard operation
ondemand copied to clipboard

set HOME to be different from what's in LDAP

Open johrstrom opened this issue 5 years ago • 3 comments

From discourse

We connect to Active Directory but we override it with sssd settings since the value in 
Active Directory does not match our system. We do this with "override_homedir = 
/users/%u" option. It is working fine on the command line for users just not 
through ondemand.

Essentially they need to override the home directory from the Etc module here because the value in LDAP is incorrect.

┆Issue is synchronized with this Asana task by Unito

johrstrom avatar Oct 10 '19 17:10 johrstrom

There is also this issue:

https://github.com/OSC/ood_support/blob/a5e42a1b31d90763964f39ebe241e69c15d0f404/lib/ood_support/user.rb#L27

So the problem may be present in other areas beside checking for the existence of the home directory on startup

ericfranz avatar Oct 10 '19 18:10 ericfranz

This is similar to the problem of how to determine group membership. At OSC you can no longer use the Etc Ruby module, given a gid or a group name, and determine the list of users in that group. This is why the script OSCgetent exists.

We should probably use https://github.com/OSC/ood_support/blob/master/lib/ood_support/user.rb everywhere we want to know anything about a user or the current user.

Also, is there one appropriate way to:

  • get the user's home directory (of the user of the current process)
  • get the user's group membership (of the user of the current process)
  • get the home directory of a given user (not the current process)
  • get the group membership of a given user (not the current process)
  • given a group, get the list of users in that group

Perhaps there is not one way, which means either we need to support all the possible ways and a configuration option to choose which one to use, or provide a pluggable way for a site to implement their own.

ericfranz avatar Oct 10 '19 18:10 ericfranz

http://rfranz.com/2018/10/31/ruby_home_and_getpwnam.html

ericfranz avatar Oct 10 '19 18:10 ericfranz