Skip to content

Instantly share code, notes, and snippets.

@arvati
Forked from kyamagu/smbnetfs-setup.md
Created June 16, 2020 19:29
Show Gist options
  • Save arvati/5196fcd0dc93a88516e364fbf85e7b34 to your computer and use it in GitHub Desktop.
Save arvati/5196fcd0dc93a88516e364fbf85e7b34 to your computer and use it in GitHub Desktop.

SMBNetFS

Install and setup

sudo apt-get install smbnetfs
mkdir ~/.smb
cp /etc/smbnetfs/smbnetfs.conf ~/.smb
cp /etc/samba/smb.conf ~/.smb
tee ~/.smb/smbnetfs.auth <<EOF
auth HOSTNAME USERNAME PASSWORD
EOF
chmod 600 ~/.smb/smbnetfs.auth

Usage

Mount

mkdir MOUNTPOINT
smbnetfs MOUNTPOINT
ls MOUNTPOINT/WORKGROUP
ls MOUNTPOINT/HOSTNAME
ls MOUNTPOINT/USERNAME:PASSWORD@HOSTNAME/SHAREPOINT

Unmount

fusermount -u MOUNTPOINT

DNS setup

sudo tee -a /etc/resolvconf/resolv.conf.d/base <<EOF
search mydomain.com
nameserver 192.168.0.1
EOF
sudo resolveconf -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment