Talk:Autofs
From Gentoo Linux Wiki
removed "TODO: This is 2.6 kernel settings only, need 2.4!", since
File systems
-> Kernel automounter version 4 support
also applies for 2.4
Contents |
[edit] sshfs
Would it be possible to use sshfs.fuse together with autofs? Mrwoody
If you have a sufficiently recent version of Fuse (I tested this with 2.5.3) and have installed the /sbin/mount.fuse script it is possible to mount with autofs using map line like:
"mymountpoint -fstype=fuse :/path/to/fuse/executable"
- The above example is not at all clear to me. What is the fuse executable? Does it refer to /sbin/mount.fuse? Or /usr/sbin/fusermount? Or what?
- Also, if I wanted to make sure that a certain sshfs mounted directory was only available to one specific user, how would I do that? By setting permission on a specific directory? Or by specifying some options together with `-fstype=fuse' above?
- Also is there a way to make sshfs use my (user specific) ssh keys for logging in?
- And, for those accounts which require manual typing of password -- how do I acomplish this? (Is it at all possible?) zrajm
mymountpoint -fstype=fuse,port=8822 :sshfs\#redog@myhost\:
[edit] samba credentials
What is the content/format of smb.auth for credentials?
mountpoint -fstype=smbfs,ro,logon=UserName,passwd=Password ://hostname/sharename
[edit] Auto Unmount
I understand that it's possible to unmount the cdrom when you push the eject button perhaps that should be added --Caleb
Not as such. File systems are automatically unmounted after a certain amount of time without any file access. Set your timeout to a short value, and after not having accessed the media for that long a time you can simply eject it, since the media is no longer mounted:
My /etc/autofs/auto.master contain the line:
/mnt/auto /etc/autofs/auto.removable --timeout=2 --ghost code>
And the corresponding line in /etc/autofs/auto.removable looks like this:
cdrom -fstype=iso9660,ro :/dev/cdrom code>
With the two above lines in action, my CD-ROM/DVD is now accessible at /mnt/auto/cdrom. The --ghost option ensures that that directory always exist, even when there is no media in the drive. Since I can't be bothered to type /mnt/auto/cdrom each time I wish to access the cdrom, I've added a symlink to it, located directly in /. zrajm
[edit] Hidden Windows-Shares
In order to mount a hidden Windows share, you must escape the $ character, much the same way you must in a regex.
Example:
//someserver/privateshare\$
This equates to //someserver/privateshare$ if used in the /etc/fstab file.
[edit] UUID
If anyone has problem auto-mounting by UUID they should check if umount segmentation faults as user. Both of these happened with me and a fix to both problems seemed to be to upgrade sys-apps/util-linux.
[edit] Mount on Boot
Why can't you just have the system mount the remote filesystems on boot? (I think the "Why?" section in the main article should address this as well...)
