samba’s lines to fstab

There was a long time ago I didn’t configure Windows shares access under my linux boxes.

So, I typed here this memo about changes :

  • smbfs’ filetype is deprecated, replaced by ‘cifs
  • fmask’ is deprecated, replaced by ‘file_mode
  • dmask’ is deprecated, replaced by ‘dir_mode

My new (and functionnal) entry to /etc/fstab :

//serverName/shareName   /path/to/mountpoint     cifs    user,credentials=/etc/samba/survietamine,uid=survietamine,gid=users,file_mode=0770,dir_mode=0770 0 0

and the credentials file (/etc/samba/survietamine here) contents :

username=survietamine
password=mySecretPassword

If you don’t want to put the share in fstab, (eg : punctual access), you can do it like this :
mount -t cifs -o username=survietamine,password=mySecretPassword //server/share /path/to/mountpoint