Re: Mounting DFS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Heinrich,

I guess you are out of luck with msdfs proxy option.
If we look at samba code, it fails here:
[samba.git] / source3 / smbd / service.c

       /* Handle non-Dfs clients attempting connections to msdfs proxy */
         if (lp_host_msdfs() && (*lp_msdfs_proxy(snum) != '\0'))  {
                 DEBUG(3, ("refusing connection to dfs proxy share '%s' "
                           "(pointing to %s)\n",
                         service, lp_msdfs_proxy(snum)));
                 *status = NT_STATUS_BAD_NETWORK_NAME;
                 return NULL;
         }

where lp_msdfs_proxy(snum) returns pointer to value of "msdfs proxy",
which obviously isn't empty. And logs message like:
      'refusing connection to dfs proxy share 'dfs' (pointing to
\\127.0.0.1\tmp)'
I don't see how it could work with this code anyway.

As far as I remember it is possible to mount remote DFS root (i.e. virtual root
that returns error STATUS_PATH_NOT_COVERED) and even a chain of them
with your kernel. But server must reply on tree connect to a such share with
error STATUS_PATH_NOT_COVERED and samba don't do it in this case.

sbmclient works because of it dumbly tries to get referrals for every share it
connects to, and after that it simply connects to a referral if
available or to the
share it was requested to connect.

Workarounds:
1. the easy way to solve issue is use conventional symlink based dfs which
works as expected.
2 Or for suicidal ones, hack the kernel and force it to accept
STATUS_BAD_NETWORK_NAME as STATUS_PATH_NOT_COVERED.
It can be done here fs/cifs/connect.c, look for keyword EREMOTE for
places to 'enhance'.

Of cause the right way is to fix samba, but you should probably ask the
author of those lines of code on samba list. I believe it is samba's issue.

--
Regards,
 Igor

On Fri, Feb 25, 2011 at 5:06 PM, Heinrich Mislik
<Heinrich.Mislik@xxxxxxxxxxxx> wrote:
> On 25 Feb 2011 at 14:25, Q (Igor Mammedov) wrote:
>
>> > mount -t cifs //someserver/share2 -ouser=someuser /mnt
>> Hi Heinrich,
>>
>> Network packets dump of mount attempt would be helpful,
>> so that I can see what exactly going on.
>
> Four Files
>
> smbclient.share1.pcap
> smbclient.share2.pcap
> mount.share1.pcap
> mount.share2.pcap
>
> attached for the following commands:
>
> smbclient -U mi //share99.univie.ac.at/dfs/share1
> smbclient -U mi //share99.univie.ac.at/share2
> mount -t cifs -o user=mi //share99.univie.ac.at/dfs/share1 /mnt ccess
> mount -t cifs -o user=mi //share99.univie.ac.at/share2 /mnt
>
> the last command failed with:
>
> Retrying with upper case share name
> mount error(6): No such device or address
> Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
>
> Relevant part of smb.conf on share99.univie.ac.at:
>
> [dfs]
> Â msdfs root = yes
> # symlink exists: /home/dfs/share1 -> msdfs://share.univie.ac.at/zid
> Â path = /home/dfs
> [share2]
> Â msdfs root = yes
> Â msdfs proxy = \share.univie.ac.at\zid
>
> The IP-Adresses are:
>
> 131.130.1.215 ... Server holding dfs-referrals
> 131.130.1.217 ... Server holding actual share
> 131.130.1.80 Â... client
>
> Hope this helps
>
> Cheers
>
> Heinrich
> --
> Heinrich Mislik
> Zentraler Informatikdienst der Universitaet Wien
> A-1010 Wien, Universitaetsstrasse 7
> Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140
>
>
> The following section of this message contains a file attachment
> prepared for transmission using the Internet MIME message format.
> If you are using Pegasus Mail, or any other MIME-compliant system,
> you should be able to save it or view it from within your mailer.
> If you cannot, please ask your system administrator for assistance.
>
> Â ---- File information -----------
> Â Â File: Âsmbclient.share1.pcap
> Â Â Date: Â25 Feb 2011, 14:15
> Â Â Size: Â7009 bytes.
> Â Â Type: ÂUnknown
>
> The following section of this message contains a file attachment
> prepared for transmission using the Internet MIME message format.
> If you are using Pegasus Mail, or any other MIME-compliant system,
> you should be able to save it or view it from within your mailer.
> If you cannot, please ask your system administrator for assistance.
>
> Â ---- File information -----------
> Â Â File: Âsmbclient.share2.pcap
> Â Â Date: Â25 Feb 2011, 14:15
> Â Â Size: Â6757 bytes.
> Â Â Type: ÂUnknown
>
> The following section of this message contains a file attachment
> prepared for transmission using the Internet MIME message format.
> If you are using Pegasus Mail, or any other MIME-compliant system,
> you should be able to save it or view it from within your mailer.
> If you cannot, please ask your system administrator for assistance.
>
> Â ---- File information -----------
> Â Â File: Âmount.share1.pcap
> Â Â Date: Â25 Feb 2011, 14:15
> Â Â Size: Â6724 bytes.
> Â Â Type: ÂUnknown
>
> The following section of this message contains a file attachment
> prepared for transmission using the Internet MIME message format.
> If you are using Pegasus Mail, or any other MIME-compliant system,
> you should be able to save it or view it from within your mailer.
> If you cannot, please ask your system administrator for assistance.
>
> Â ---- File information -----------
> Â Â File: Âmount.share2.pcap
> Â Â Date: Â25 Feb 2011, 14:15
> Â Â Size: Â4692 bytes.
> Â Â Type: ÂUnknown
>
>

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux