how to auto map cifs to a username mount without & for the share path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everbody,

I got the following autofs mapping example:

/mnt/org/home       /etc/auto.home --timeout=0

* -fstype=cifs,sec=krb5,uid=${UID},gid=${UID},cruid=${UID},file_mode=0660,dir_mode=0770,echo_interval=12 ://samba.example.lan/users/&

//samba.example.lan/users/<username> is on the server so //samba.example.lan/users/& works fine, however I got other shares that I want to mount and only accessable per user basis (securiy permissions)

/mnt/org/documents  /etc/auto.documents --timeout=0
* -fstype=cifs,sec=krb5,uid=${UID},gid=${UID},cruid=${UID},file_mode=0660,dir_mode=0770,echo_interval=12 ://samba01.bothends.lan/documents

This mapping does works and it mounts the document share as /mnt/org/documents/<username> however it also mount /mnt/org/documents/.hidden and tries to mount as root and all the other lookups in /mnt/org/documents will get a mount because the catchall * and no matching & limit in the shrae path. It becomes a mess.

I have searched the manuals and I can not find a mapping system without & in the file path I want the * to match the user name so only that lookup with the username will be mounted.

& -fstype=cifs ://samba01.bothends.lan/documents
$USER -fstype=cifs ://samba01.bothends.lan/documents

Something like this. How can I do this witout hardcoding the usernames mount points? If this functionality is not supported would it be possible to have * be replaced with a variable or some more dynamic feature? Tips?

Thank you in advance,

Kind regards,

Jelle de Jong



[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux