For example, change directory (cd) to /mnt/tree. If you change to one of the directories listed in the file auto.master and run the ls command, you won’t see anything immediately. sudo service autofs restart Testing autofs This doesn’t have to be done if you prefer a local home directory instead, the user could use this as simple remote storage for specific files.įinally, restart the autofs daemon so it will recognize and load these configuration file changes. Their home directory should be mapped accordingly in the passwd file. The ampersand also works as a wildcard representing the user's directory on the server side. The asterisk (referred to as a wildcard) makes it possible for each user's share to be automatically mounted when they log in. In this case, Carl and Sarah's files will be available in the directories /home/tree/carl or /home/tree/sarah, respectively. This line instructs autofs to mount the users share at the location matched in the auto.master file for. Third, create the file with the following line: * -fstype=nfs tree:/home/& As shown above, these files will be available in the directory /mnt/tree/ourfiles. This line instructs autofs to mount the ourfiles share at the location matched in the auto.master file for auto.misc. Second, add the following line to the file auto.misc: ourfiles -fstype=nfs tree:/share/ourfiles Go ahead and create those directories: sudo mkdir /mnt/tree /home/tree First, add the following two lines to the file auto.master: /mnt/tree /etc/auto.miscĮach line begins with the directory where the NFS shares will be mounted. Now you need to edit several of these files and add the file. rwxr-xr-x 1 root root 2191 Configure autofs You can verify that the autofs files have been placed in the etc directory: cd /etc ll auto* You need to install only two packages: nfs-common for NFS client functions, and autofs to provide the automount function. I’m assuming a basic home or even small office network that might lack proper internal domain name service (i.e., DNS). sudo getent passwd carl sarahġ27.0.1.1 workstation1Īs you can see, both the client workstation and the NFS server are configured in the hosts file. Checking the relevant configuration files should confirm. Also, your workstations and server should have the same domain name. Also assume a data directory named ourfiles and two user directories, for Carl and Sarah, are being shared by this server.Ī few best practices will make things work a bit better: It is a good idea to use the same user ID for your users on the server and any client workstations where they have an account. Free online course: RHEL Technical Overviewįirst, a few assumptions: Assume the NFS server named is up and running.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |