diff --git a/ConnectingSMBShares.md b/ConnectingSMBShares.md index ce5abec..c2f2e23 100644 --- a/ConnectingSMBShares.md +++ b/ConnectingSMBShares.md @@ -111,10 +111,10 @@ Make a credentials file using previous steps. For this example, my credentials a In Void, AutoFS uses the file `/etc/autofs/auto.master` as its directory master. We can avoid editing this file by putting our directory map files in `/etc/autofs/auto.master.d/`. This files may be in a seperate location in a different distros -You will need 2 files: a directory map and a file map. +You will need 2 files: a directory map and a file map. Create the directory map -`/etc/autofs/auto.master.d/.autofs` -and the key file +`/etc/autofs/auto.master.d/.autofs` +and the key file `/etc/autofs/auto.` The directory map can contain multiple maps, however we are going to make one file per map. @@ -122,32 +122,31 @@ The directory map can contain multiple maps, however we are going to make one fi ## Indirect Mapping Indirect mapping allows the user to specify the mount point in the directory map and the subfolder in the key file -In the directory map we want to list the mount point for thee smb share and it's key file -`/mnt /etc/autofs/auto.` -This tells autofs to mount the share in a subdirectory of /mnt - -In the key file we need to specify the name of the subdirectory, our config options, and thee smb server location -` -fstype=cfs,credentials=/home/**username**/.servercreds/-creds,uid=,gid= :` -as with systemd, replace `uid=,gid=` with your user and group id respectively. -They will probably both be 1000 (so `uid=1000,gid=1000`), but you can check with `id` or `id **username**` -If using an IP address, it needs to be put before `::` +In the directory map we want to list the mount point for thee smb share and it's key file +`/mnt /etc/autofs/auto.` +This tells autofs to mount the share in a subdirectory of /mnt +In the key file we need to specify the name of the subdirectory, our config options, and thee smb server location +` -fstype=cfs,credentials=/home/**username**/.servercreds/-creds,uid=,gid= :` +As with systemd, replace `uid=,gid=` with your user and group id respectively. +They will probably both be 1000 (so `uid=1000,gid=1000`), but you can check with `id` or `id **username**` +If using an IP address, it needs to be put before `::` ## Direct Mapping Direct mapping requires the user to specify the entire mounting path in the key file -In the directory map we want to specify we replace the mount point with `/-` to indicate that we are using direct mounting -`/- /etc/autofs/auto.` -This tells autofs to mount the share using the path found in the key file +In the directory map we want to specify we replace the mount point with `/-` to indicate that we are using direct mounting +`/- /etc/autofs/auto.` +This tells autofs to mount the share using the path found in the key file -In the key file we now need to the entire mounting path rather than just the subdirectoory -`/mnt/ - :` +In the key file we now need to the entire mounting path rather than just the subdirectoory +`/mnt/ - :` ## Testing configuration -To test the configuration, without the `autofs` service running, launch `automount` using -`# automount -f -v` -If you configured everytning properly, you will see -`mounted /mnt/` +To test the configuration, without the `autofs` service running, launch `automount` using +`# automount -f -v` +If you configured everytning properly, you will see +`mounted /mnt/` Exit `automount` and restart the `autofs` service