Update ConnectingSMBShares.md
This commit is contained in:
1 parent
a1157c31ae
commit
2b252e0151
1 file changed
+20
-21
+20
-21
@@ -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/<server-name>.autofs`
|
||||
and the key file
|
||||
`/etc/autofs/auto.master.d/<server-name>.autofs`
|
||||
and the key file
|
||||
`/etc/autofs/auto.<server-name>`
|
||||
|
||||
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.<server-name>`
|
||||
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
|
||||
`<server-name> -fstype=cfs,credentials=/home/**username**/.servercreds/<server-name>-creds,uid=<uid>,gid=<gid> :<server-location>`
|
||||
as with systemd, replace `uid=<uid>,gid=<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 `:<server-location`: `<ip>:<server-location>`
|
||||
In the directory map we want to list the mount point for thee smb share and it's key file
|
||||
`/mnt /etc/autofs/auto.<server-name>`
|
||||
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
|
||||
`<server-name> -fstype=cfs,credentials=/home/**username**/.servercreds/<server-name>-creds,uid=<uid>,gid=<gid> :<server-location>`
|
||||
As with systemd, replace `uid=<uid>,gid=<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 `:<server-location`: `<ip>:<server-location>`
|
||||
|
||||
## 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.<server-name>`
|
||||
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.<server-name>`
|
||||
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/<server-name> -<options> :<server-location>`
|
||||
In the key file we now need to the entire mounting path rather than just the subdirectoory
|
||||
`/mnt/<server-name> -<options> :<server-location>`
|
||||
|
||||
## 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/<server-name>`
|
||||
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/<server-name>`
|
||||
|
||||
Exit `automount` and restart the `autofs` service
|
||||
|
||||
|
||||
Reference in new issue
Block a user