Skip to content

Instantly share code, notes, and snippets.

View nerdybeast's full-sized avatar

Michael Penrod nerdybeast

View GitHub Profile
@nerdybeast
nerdybeast / autofs
Created April 25, 2020 16:49
Automount a windows share (via cifs) on Ubuntu-based system
Problem: Need to access Windows share but only when on the company vpn.
- Tried mounting via fstab but the mount failed because I'm not automatically connected to the vpn when logged in
- Created a bash alias that simply mounts the share, the problem is that it's cumbersome to start the vpn then remember to run the mount command.
Autofs is a great option as it will automount that windows share only if I try and access it.
# Has to install it (Linux Mint 19)
sudo apt install autofs
# Opended the "/etc/auto.master" file the install created and added this line: