Linux - AutoMounting the stock network shares

From The TinkerNet Wiki
Jump to navigation Jump to search

Automatically mounting directories on an as-needed basis... See Autofs

sudo apt-get install autofs

/etc/auto.sambashares

Video -fstype=cifs,rw,uid=1000,iocharset=utf8 ://192.168.0.10/Video
TGG -fstype=cifs,rw,uid=1000,guest,iocharset=utf8 ://192.168.0.10/TGG
Music -fstype=cifs,rw,username=tinker,password=0Defect,uid=1000,iocharset=utf8 ://192.168.0.10/Music
Library -fstype=cifs,rw,username=tinker,password=0Defect,uid=1000,iocharset=utf8 ://192.168.0.10/Library
Workspace -fstype=cifs,rw,uid=1000,iocharset=utf8 ://192.168.0.90/Workspace
Web -fstype=cifs,rw,uid=1000,iocharset=utf8 ://192.168.0.13/websites
Lennier -fstype=cifs,rw,uid=1000,iocharset=utf8 ://192.168.0.11/External
Draal -fstype=cifs,rw,uid=1000,iocharset=utf8 ://192.168.0.10/Draal Stuff

/etc/auto.master

/mnt/Samba /etc/auto.sambashares --timeout=30 --ghost
######+auto.master

(Basically replace the last line)

Refreshing the shares after changes

Mint 17: (5.0.7-1ubuntu3.2)

sudo reload autofs

Mint 18: (5.1.1-1ubuntu3.1)

sudo /etc/init.d/autofs restart