Timeline for Using autofs to mount under each users' home directory
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 24, 2014 at 20:39 | vote | accept | jimbobmcgee | ||
| Jan 9, 2013 at 22:11 | comment | added | slm♦ | I believe it's background only. The script can merely dynamically generate the key,values that would normally be returned similar to a text file that contains the automount maps. I don't believe the users are able to interact with it in any way. | |
| Jan 9, 2013 at 22:08 | comment | added | jimbobmcgee | Have you used scripts before? I get that you have to print the resultant autofs 'file' to stdout, but can it spit stderr to the end-user and read user input with read var (I'm thinking specifically about prompting for credentials, or at least reporting failure)? Or is the script run in a background process somewhere? | |
| Jan 9, 2013 at 16:45 | comment | added | slm♦ | Agreed. Other than FUSE, I think you're only other option will be the script for getting more elaborate setups. | |
| Jan 9, 2013 at 16:35 | comment | added | jimbobmcgee | This is a matter of clarity in documentation then, I guess: the man line The following special variables will be substituted in the *key and location fields* of an automounter map if prefixed does not apply to the per-user variables that follow the man line autofs provides additional variables that are set based on the user requesting the mount. The script approach might be interesting, though. I'll see if I can wrap my head around coercing the logic into a working script... | |
| Jan 8, 2013 at 14:44 | comment | added | slm♦ | Yes my understanding is that those variables can only be used on the right side (the value) of the auto map files. The left side being the key. I've added additional notes to my answer to try and clear up what I was saying regarding the variables. | |
| Jan 8, 2013 at 14:43 | history | edited | slm♦ | CC BY-SA 3.0 | added more details |
| Jan 8, 2013 at 14:37 | comment | added | slm♦ | One other approach you can take is that the map files can be scripts, so you can have a program/script generate the output as long as it conforms to the key & value syntax. Here's an example: ubuntuforums.org/showthread.php?t=2036409 | |
| Jan 8, 2013 at 12:58 | comment | added | jimbobmcgee | Thanks for this. Given autofs provides additional variables that are set based on the user requesting the mount, does that not mean $USER is already understood by autofs to be the guy who just cd'd into the path? Same with $HOME, I'd have thought. Is that the bit I am misunderstanding? Could it be more that the variable substitution cannot take place in the path part of the config file, only in the response part? So I can automount with config: /mydomain /etc/auto.mydomain --timeout=60 but I can't with config: $HOME/mydomain /etc/auto.mydomain --timeout=60? | |
| Jan 8, 2013 at 4:02 | history | answered | slm♦ | CC BY-SA 3.0 |