SEARCH
TOOLBOX
LANGUAGES
MountingWindowsSharesInLinux

MountingWindowsSharesInLinux

From GarrettHoneycutt

Jump to: navigation, search

Contents

Automatic mount at boot

Add these lines to your fstab and create the file to hold your credentials, so that they are not readable by everyone.

/etc/fstab

//10.1.2.3/public       /mnt/public      cifs credentials=/root/cred.smb 0 0
//10.1.2.4/mp3          /mnt/mp3         cifs credentials=/root/cred.smb 0 0

/root/cred.smb

username=gh
password=l33tp4ssw0rd

Mount on demand

/etc/fstab

//10.1.2.3/public       /mnt/public      cifs noauto,user,username=gh 0 0
//10.1.2.4/mp3          /mnt/mp3         cifs noauto,user,username=gh 0 0