Bug 5975 - DFS Referral Problems
DFS Referral Problems
Status: NEW
Product: Samba 3.2
Classification: Unclassified
Component: File services
3.2.6
x86 Linux
: P3 normal
: ---
Assigned To: Volker Lendecke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-16 02:09 UTC by Charles L
Modified: 2011-07-18 17:33 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles L 2008-12-16 02:09:18 UTC
I'm unable to use samba to access a folder shared on our work server, due to it
recently being changed to be a DFS referral. I've tried a couple of different
ways to access the folder, and each have different symptoms.

Basically the closest i get is with smbclient, but I'm unable to mount the share
in a useable way.

This is with the stock samba on Ubuntu 8.04 (3.0.28a-1ubuntu4.7), but I've also
tried smbclient in samba-3.2.6 with the same result.

Let me know if you need any other information, or want me to test something.


1. Using smbnetfs (same result with fusesmb).

% smbnetfs -d Network
% ls Network/Server/Shared/Folder1

LOOKUP /Server/Shared/Folder1/Folder2
Password: 
tree connect failed: NT_STATUS_ACCESS_DENIED
Unable to follow dfs referral [\Server\Shared1$]
Couldn't resolve \Folder1\Folder2

^ at the password prompt i try to retype my password but it is no help.

2. Using smbclient.

% smbclient -UDOMAIN/user '\\Server\Shared' pass 
Domain=[DOMAIN] OS=[Windows Server 2003 3790 Service Pack 1] Server=[Windows Server 2003 5.2]
smb: \> dir Folder1\Folder2
NT_STATUS_ACCESS_DENIED listing Folder1\Folder2

                58260 blocks of size 4194304. 43265 blocks available
smb: \> cd Folder1\Folder2
smb: \Folder1\Folder2\> dir
  .                                   D        0  Fri Sep 12 17:34:49 2008
  ..                                  D        0  Fri Sep 12 17:34:49 2008
  Process Management                  D        0  Wed Nov 26 21:15:53 2008
  Legal                               D        0  Wed Oct 15 09:57:19 2008
  ...

                64736 blocks of size 4194304. 12076 blocks available
smb: \Folder1\Folder2\> 

3. Using the kernel cifs module. Hmmm, interesting...

% sudo mount -t cifs --verbose -o user=DOMAIN/user%password '\\ntsyd16\Shared' Network
% ls Network/
Folder1
% ls Network/Folder1
Folder1
% ls Network/Folder1/Folder1
Folder1
% ls Network/Folder1/Folder1/Folder1
Folder1
% ls Network/Folder1/Folder1/Folder1/Folder1
ls: cannot access Network/Folder1/Folder1/Folder1/Folder1/: No such file or directory
Comment 1 Charles L 2008-12-16 23:12:21 UTC
I'm trying to trace cli_resolve_path, and came up with another interesting data point using smbclient (no changing working directory now). It appears to only affect the top level of the DFS referral, but anything below that is fine.

smb: \> dir Folder1\Folder2
NT_STATUS_ACCESS_DENIED listing Folder1\Folder2

                58260 blocks of size 4194304. 43265 blocks available
smb: \> dir Folder1\Folder2\*
  .                                   D        0  Fri Sep 12 17:34:49 2008
  ..                                  D        0  Fri Sep 12 17:34:49 2008
  Process Management                  D        0  Wed Nov 26 21:15:53 2008
  Legal                               D        0  Wed Oct 15 09:57:19 2008
  ...

                64736 blocks of size 4194304. 12076 blocks available
smb: \> dir Folder1\Folder2\Legal
  Legal                               D        0  Tue Dec 16 13:54:10 2008

		58260 blocks of size 4194304. 43258 blocks available
smb: \> 

Comment 2 Derrell Lipman 2008-12-17 10:23:38 UTC
corrected component
Comment 3 Volker Lendecke 2009-01-01 14:40:04 UTC
Can you give a sniff of smbclient getting the failure? I just tried:  smb: \> dir ghome\samba.git   samba.git                           D        0  Thu Jan  1 20:01:32 2009                  64505 blocks of size 16384. 19220 blocks available smb: \>   where ghome is a dfs link on a samba share. Works fine for me.  Thanks,  Volker 
Comment 4 Charles L 2009-01-01 17:52:38 UTC
Actually my above comment is using smbclient, as is attempt #2 in the original report.
Comment 5 Volker Lendecke 2009-01-02 04:49:35 UTC
Sure, I've seen that. I was asking for a network trace. You can create it using

tcpdump -i eth0 -n -s 1500 -w /tmp/sniff.cap

The part that is interesting is the file /tmp/sniff.cap

Thanks,

Volker
Comment 6 Charles L 2009-01-14 21:18:56 UTC
Hi Volker,

I've uploaded 2 tcp dumps. The first one (http://aquasync.googlepages.com/sniff1.cap) is me connecting, and listing the directory (which fails with NT_STATUS_ACCESS_DENIED). 

The second (http://aquasync.googlepages.com/sniff2.cap) is identical, but I append '\*' when listing the directory, which makes it succeed (see above for smbclient transcripts).

Thanks for you help,

Charles
Comment 7 BBB 2010-02-09 18:46:26 UTC
I have the same problem in spades.  Needless to say, it works using windows tools.  I demonstrate this below using smbclient, but using, say, the Nautilus "connect to server" dialog is similarly broken.  Names changed below to protect whatever...

Linux Mint 8 Helena - x64 Edition (based on Ubuntu Jaunty).

-=-=-=-=-=-=-=

$ smbclient -V
Version 3.4.0
$ smbclient -U myname \\\\someplace\\someshare
Enter mynames's password: 
Domain=[SOMEDOMAIN] OS=[Windows Server 2003 R2 3790 Service Pack 2] Server=[Windows Server 2003 R2 5.2]
smb: \> dir
  .                                   D        0  Tue Dec  8 15:43:34 2009
  ..                                  D        0  Tue Dec  8 15:43:34 2009
[---snip---]
  Timesheets_Current                  D        0  Sun Sep 28 14:41:31 2008
smb: \> cd Timesheets_Current\
session setup failed: NT_STATUS_LOGON_FAILURE
Unable to follow dfs referral [\SERVERSTORAGE01\Data1]
cd \Timesheets_Current\: NT_STATUS_PATH_NOT_COVERED
smb: \> 
Comment 8 James.Schatzman 2011-07-18 17:33:32 UTC
I observe the problem of "Unable to follow dfs referral" using

smbclient version 3.5.8
Fedora FC15
Windows Server 2008

I can connect to the top level share, but when I attempt to "cd" to the folder that is a dfs referral, I get the above error. A Windows computer on the same network has no problem getting to the folder in question.

This seems to be an important issue because it makes accessing complex Windows file shares difficult or impossible.