guest@backslash:~/posts/linux/linux-mount-smb$

Mount smb Linux

~1 minsmb linux windows files

Linux mount smb

How to share a folder with Samba and mount the share on another Linux machine.

Set up

Config file

Set up file smb.conf

sh
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = debian
security = user
map to guest = bad user
dns proxy = no

[Media]
  comment = Media
  path = /mnt/md0/Media
  valid users = nas slash
  force group = nas
  create mask = 0660
  directory mask = 0771
  writable = yes

Users

Need to set smb password:

sh
sudo smbpasswd -a nas

Mount

mounting is a way of testing if the share works

sh
mount -t cifs //SERVER/sharename /mnt/mountpoint -o username=username,password=password,iocharset=utf8,vers=3.1.1

BACKSLASH(1)                  User Commands

NAME
       backslash - keyboard navigation

KEYS
       j / k      scroll down / up
       n / p      next / previous post
       gg / G     top / bottom of the page
       /          filter posts
       ?          this help
       Esc        close