The asterisk referred to as a wildcard makes it possible for each user's share to be automatically mounted when they log in. The ampersand also works as a wildcard representing the user's directory on the server side. Their home directory should be mapped accordingly in the passwd file. Finally, restart the autofs daemon so it will recognize and load these configuration file changes.
If you change to one of the directories listed in the file auto. The cd command will also be executed and you will be placed into the newly mounted directory.
To further confirm that things are working, the mount command will display the details of the mounted share. Configure a basic automount function on your network file system. Image by :. Get the highlights in your inbox every week.
More Linux resources. Our latest Linux articles. Topics Linux. Note that template and source arguments are alternative. Activate automatic monitoring recommended, but disabled by default. This option requires the usage of Example42 monitor and relevant monitor tools modules. Activate automatic firewalling. This option requires the usage of Example42 firewall and relevant firewall tools modules. Skip to content. This repository has been archived by the owner.
It is now read-only. Star 0. Puppet module for Autofs View license. Branches Tags. If it finds something in the root directory to expire it will return the name of that thing. Once a name has been returned the automount daemon needs to unmount any filesystems mounted below the name normally. As described above, this is unsafe for non-toplevel mounts in a version-5 autofs. For this reason the current automount 8 does not use this ioctl.
This will work for both direct and indirect mounts. If it selects an object to expire, it will notify the daemon using the notification mechanism described below. This will block until the daemon acknowledges the expiry notification.
There are several forms of communication between the automount daemon and the filesystem. As we have already seen, the daemon can create and remove directories and symlinks using normal filesystem operations. Any request arriving from a process in that process group is considered to come from the daemon.
If the daemon ever has to be stopped and restarted a new pgid can be provided through an ioctl as will be described below. For version 5, the format of the message is:. The root directory of an autofs filesystem will respond to a number of ioctls.
This mode is also entered if a write to the pipe fails. This passes a pointer to an unsigned long. The value is used to set the timeout for expiry, and the current timeout value is stored back through the pointer. Returns, in the pointed-to int , 1 if the filesystem could be unmounted. This is only a hint as the situation could change at any instant. This call can be used to avoid a more expensive full unmount attempt. This is filled in with the name of something that can be unmounted or removed.
The argument is an integer which can contain two different flags. This assumes that the daemon has requested this because it is capable of performing the umount. This is only safe when maxproto is 4.
It is not always possible to open the root of an autofs filesystem, particularly a direct mounted filesystem. If the automount daemon is restarted there is no way for it to regain control of existing mounts using any of the above communication channels.
The filesystem is identified by name and device number, which is stored in openmount. The process group of the calling process is used to identify the daemon. On successful return, requester. This happens if a write to the notification pipe fails, or if it is explicitly requested by an ioctl.
When entering catatonic mode, the pipe is closed and any pending notifications are acknowledged with the error ENOENT. Once in catatonic mode attempts to access non-existing names will result in ENOENT while attempts to access existing directories will be treated in the same way as if they came from the daemon, so mount traps will not fire. When the filesystem is in catatonic mode, any process with a matching UID can create directories or symlinks in the root directory, but not in other directories.
This is intended to be used by user space programs to exclude autofs mounts from consideration when reading the mounts list. With bind mounts and name spaces it is possible for an autofs filesystem to appear at multiple places in one or more filesystem name spaces.
0コメント