2

Is it possible to mount the "root" of a Windows Samba Share? I have successfully mounted a specific Samba share with this:

mount.cifs //server/share /mnt -o username=blub

What I would like to mount is the overview of all accessible shares, which Windows shows if you enter \\server in the Explorer.

But mounting like this:

mount.cifs //server /mnt --verbose -o username=blub

fails with:

Password for blub@//server:  ********
mount.cifs kernel mount options: ip=172.16.83.13,unc=\\server\,user=blub,prefixpath=mnt,pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Reading the manpage did not lead me to anything. Is it even possible to do such things with CIFS? I have neither read that this specific thing is impossible or that it should be possible. All examples are just mounting \\server\share and not the share overview.

I am using Gentoo Linux with cifs-utils 6.1, Kernel 3.18.7.

4
  • AFAIK you need to mount each share separately, as each share may have its own restrictions and allowed users. The list can be obtained with smbclient -L ..., if that's what you're after. You can't mount the "root" of multiple NFS exports either.
    – wurtel
    Mar 9, 2015 at 15:42
  • 1
    @wurtel well, actually, with NFSv4 you can, but that's beside the point.
    – derobert
    Mar 9, 2015 at 15:48
  • Well, that's a pity. I thought this is quite a nice thing, but then I will mount each share separately. Thanks for your answers!
    – Andi
    Mar 9, 2015 at 16:20
  • 1
    @wurtel I hate to see questions languish without an answer so I've copied your comment as an answer (Community Wiki). Feb 4, 2019 at 16:11

1 Answer 1

1

This is not actually possible. You need to mount each share separately, as each share may have its own restrictions and allowed users. The list can be obtained with smbclient -L ...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .