[SSSD-users] AutoFS and variables

Ian Kent ikent at redhat.com
Wed Feb 4 06:06:41 UTC 2015


On Tue, 2015-02-03 at 15:47 +0100, Jakub Hrozek wrote:
> On Tue, Feb 03, 2015 at 09:21:10AM -0500, Brendan Kearney wrote:
> > On Mon, 2015-02-02 at 14:08 +0100, Jakub Hrozek wrote:
> > > On Mon, Feb 02, 2015 at 06:50:12AM -0500, Dmitri Pal wrote:
> > > > On 02/02/2015 01:52 AM, Jakub Hrozek wrote:
> > > > >On Sun, Feb 01, 2015 at 11:17:02AM -0500, Brendan Kearney wrote:
> > > > >>On Sat, 2015-01-31 at 19:01 -0500, Dmitri Pal wrote:
> > > > >>>On 01/31/2015 12:23 PM, Brendan Kearney wrote:
> > > > >>>>i want to have an automount configured so that
> > > > >>>>nas.bpk2.com:/export/music is mounted on /home/<username>/Music.  i want
> > > > >>>>to use the HOME variable, but several attempts have not gotten the job
> > > > >>>>done.  i have tried $HOME/Music, ${HOME}/Music, and {$HOME}/Music, and
> > > > >>>>none have worked.
> > > > >>>>
> > > > >>>>what is the correct way to use a variable with AutoFS and SSSD?  i have
> > > > >>>>used the hard values to get things working for my id, but want to have
> > > > >>>>this work for all users.
> > > > >>>>
> > > > >>>>dn:
> > > > >>>>automountKey=/home/brendan/Music,automountMapName=auto.shares,cn=autofs,ou=Daemons,dc=bpk2,dc=com
> > > > >>>>automountinformation: nas.bpk2.com:/export/music
> > > > >>>>automountkey: /home/brendan/Music
> > > > >>>>description: music
> > > > >>>>objectclass: automount
> > > > >>>>objectclass: top

This is a direct mount map entry.
You can't use the wildcard key in a direct mount key.

Oddly enough I suspect you could use the & substitution in the mount
location but that's generally not useful because it would replace the
whole path (the entire key) at it's occurrence in the mount location.  

You can't use macros in lookup keys with them (or indirect mounts)
either because the path is used as the lookup key.

I know you think that using the information about the requesting could
be used but it's not as simple as that.

The problem is that multiple processes could request a mount at the same
time, resulting in a queue waiting for mount completion, and the user
information that is returned will be that of the process that originally
triggered the mount and so might not be what you'd expect. There's no
straight forward way to fix that.

That's why macro substitution isn't done on lookup keys and can't really
be done safely.

You can do tricks with a combination of indirect mounts, sub-mounts and
the wildcard map entry (ie. & substitution).

I'd need some time to come up with an example of how to implement
something like what your after. Would you like me to do that?

The amd map entry format, while somewhat harder to use, does allow macro
substitution in keys, including in the implementation I've recently
added to autofs. In fact, if you want hard to maintain, complicated
maps, that do nifty things it might be worth looking at that map format.

> > > > >>>>
> > > > >>>>thanks,
> > > > >>>>
> > > > >>>>brendan
> > > > >>>>
> > > > >>>>_______________________________________________
> > > > >>>>sssd-users mailing list
> > > > >>>>sssd-users at lists.fedorahosted.org
> > > > >>>>https://lists.fedorahosted.org/mailman/listinfo/sssd-users
> > > > >>>I am not sure it is possible. Please file an RFE.
> > > > >>>
> > > > >>umm... how?  i dont see a sign-in link in the trac page.  do you have a
> > > > >>link?
> > > > >This would be an autofs RFE right? :-)
> > > > 
> > > > No it is more IPA and SSSD one(s).
> > > > IPA to store the keys with macro
> > > > and SSSD to expand the macro
> > > > 
> > > > No?
> > > 
> > > My understanding is that the expansion is done by the automounter
> > > deamon. IIRC there is something like "&" for homedirs. I would advise to
> > > ask on autofs lists first.
> > > 
> > > Please note I'm not saying we don't have any bugs in sssd, chances are
> > > we do, but so far I think we sholdn't touch the variables..
> > > _______________________________________________
> > > sssd-users mailing list
> > > sssd-users at lists.fedorahosted.org
> > > https://lists.fedorahosted.org/mailman/listinfo/sssd-users
> > 
> > so where does this leave me?  i have a SSSD with AutoFS implementation
> > that does not provide all the functionality i want, and indecision
> > around who should be doing what leaves me no option to request the
> > features
> 
> I've CC-ed the RHEL/Fedora autofs maintainer..
> 
> Ian, could you help us out with this thread? I'm afraid our autofs-fu is
> not strong enough. Here is a link to the archives so you don't have to
> hunt the thread in the archive:
>     https://lists.fedorahosted.org/pipermail/sssd-users/2015-January/002611.html
> 
> Thank you very much for your time.




More information about the sssd-users mailing list