Hey,
Background: so I came across the problem that snaps don't allow home directories outside /home (c.f. https://bugs.launchpad.net/snappy/+bug/1620771 ). So I use override_homedir in sssd.conf to fix this (I have to say almost since I still can't start the snaps in $HOME (/home/$USER) but any other directory, even $HOME/Desktop). However, there is another layer of complication in my scenario: I don't have one file server but two that serve the home directories. Therefore, I use a autofs script to get the correct user mounts (auto.home.sh).
fs1 /fs1/home/$USER ------+ |------ client sssd.conf: override_homedir = /home/%u fs2 /fs2/home/$USER ------+ auto.home.sh: script to choose correct mountpoint for $USER
Problem: I would like to get the original home directory (e.g. /fs1/home/$USER) on the client. getent passwd only gets me /home/$USER (overriden by the parameter override_homedir in sssd.conf). So my hacky solution is right now to use ldbsearch:
declare -r DOMAIN=example.com declare -r LDBDB= /var/lib/sss/db/cache_bc.frontend.ldb ldbsearch -H $LDBDB '($USER@$DOMAIN)' homeDirectory
Another possibilty would be to use ldapsearch directly but I would like to first query the sss cache.
Is there a better way to solve this problem?
Thanks Steffen