It seems that allmost ANY question or explanation on this subject deals with mounting linux shares in windows or the other way around.

I've got a simple linux server (raspbian), running a Samba server with a public share, that I want to mount and access frmo another linux machine running Ubuntu.

The Linux Samba server

smb.conf share:

    path = /mnt/Storage/public
    public = yes
    browsable = yes
    read only = no
    gust ok = yes
    force user = nobody

The share points to a USB disk formatted with ext3.

The Linux Samba client

$ sudo smbclient -L

Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.2.14-Debian]

    Sharename       Type      Comment
    ---------       ----      -------
    print$          Disk      Printer Drivers
    Public          Disk
    IPC$            IPC       IPC Service (Samba 4.2.14-Debian)

So, the ubuntu machine clearly sees the samba share, but how to mount and access it?

$  sudo /usr/bin/smbclient \\\\\\public

WARNING: The "syslog" option is deprecated
Enter root's password:

Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.2.14-Debian]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME

$ mount.cifs // /mnt/public -o username=pi

mount.cifs: permission denied: no match for /mnt/public found in /etc/fstab

I've tried some messing with fstab, without success, but do I REALLY have to do that? In windows I can mount and unmount samba shares as much as I want - why not in linux?

NB: This is a public share, which should be accessible without username or password, so any fstabs pointing to a credentials file would be unnecessary.

Anyone got any quick pointers to actual valid and non-outdated information for what I thought was a simple thing?

  • Can you verify that /mnt/public is not listed in your /etc/fstab file? And if so, can you add that entry to your question? – uSlackr Mar 22 '17 at 17:33
  • It's not listed there. And why should it have to? – Hfrav Mar 23 '17 at 13:08
  • it does not need to be. While looking for solutions I stumbled upon an issue caused by having it in fstab and configured wrong. – uSlackr Mar 23 '17 at 15:15
  • If the share is public, why are you specifying a username (-o username=pi )? have you tried it without? – uSlackr Mar 23 '17 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.