To do this we will create a config file for the mount, and direct autofs to use this file.
In auto.servername we define how to mount the share .
$ cat /etc/auto.servername
sharename -fstype=cifs,rw,uid=1000,gid=1000,password=Password1 ://servername/sharename
We define the mount location and the auto.servername file to use, appending to the existing /etc/auto.master file.
/mnt/servername /etc/auto.servername
After these are defined, we can reload autofs
sudo systemctl reload autofs
No comments:
Post a Comment