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

domain based DFS root



Hello all.

I'm fighting with windows and linux to set-up a domain based DFS on Debian server.

There is a domain based DFS root on windows servers. Folders are hosted on windows servers too. Now I want to host the shared folders on Debian. For this I've setup Debian Wheezy x64 and joined it as a domain member. Samba is installed. Server does not act as DC, only a member of domain, to allow users to authenticate to shared folders with domain names. I don't need to user DFS-R. Replication will be done by other meanings. I want that \\domain.com\shares are mapped to \\linuxsrv\shares (and in future to \\linuxsrv2\shares).

First I've tried to create DFS root by windows gui means. Of course, it wasn't successful. When creating DFS root, windows creates on designated server the share. Of course windows can not do this on samba, and creating of DFS root fails.

Reading Internet I've found that a method to use linux shares is to create DFS root on windows server and holding share on windows, but add target folders under DFS root to shared folders on any system. This worked. So I've linked targeted folder under \\domain.com\shares as example:
\\domain.com\shares\network -> \\linuxsrv\network
\\domain.com\shares\data -> \\linuxsrv\data
\\domain.com\shares\op -> \\linuxsrv\op

and so on.

This works and targets are accessible from Windows XP/Vista/7. Also smbclient browses. I've wanted to use this manner of DFS root, although I've been needing to redirect all shortcuts to new path. But the problem raised with mount. In Debian I do `mount -t cifs \\domain.com\shares /mnt/shares` and when I try to `cd /mnt/shares/data` it cd's, but then ls does not work with error: reading directory .: Object is remote
And this is the log:
[3630141.487787] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: For smb_command 50 [3630141.487797] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: Sending smb: total_len 116 [3630141.488266] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: RFC1002 header 0x92 [3630141.488295] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: cifs_sync_mid_result: cmd=50 mid=43 state=4 [3630141.488309] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/inode.c: cifs_revalidate_cache: revalidating inode 2533274790400209 [3630141.488314] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/inode.c: cifs_revalidate_cache: inode 2533274790400209 is unchanged [3630141.488319] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/inode.c: inode 0xffff8800618cc5b8 old_time=5202422881 new_time=5202427668 [3630141.488325] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/inode.c: CIFS VFS: leaving cifs_revalidate_dentry_attr (xid = 1728677) rc = 0 [3630146.622248] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/readdir.c: CIFS VFS: in cifs_readdir as Xid: 1728678 with uid: 0 [3630146.622259] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/readdir.c: Full path: \\10.10.0.64\shares\data start at: 0 [3630146.622265] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/cifssmb.c: In FindFirst for \\10.10.0.64\shares\data [3630146.622281] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: For smb_command 50 [3630146.622290] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: Sending smb: total_len 148 [3630146.622732] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: RFC1002 header 0x23 [3630146.622744] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: invalid transact2 word count [3630146.622764] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: cifs_sync_mid_result: cmd=50 mid=44 state=4
[3630146.622776] Status code returned 0xc0000257 NT_STATUS_PATH_NOT_COVERED
[3630146.622782] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/netmisc.c: Mapping smb error code 0xc0000257 to POSIX err -66 [3630146.622787] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/cifssmb.c: Error in FindFirst = -66 [3630146.622792] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/readdir.c: initiate cifs search rc -66 [3630146.622796] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/readdir.c: CIFS VFS: leaving cifs_readdir (xid = 1728678) rc = -66 [3630146.622981] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/file.c: Closedir inode = 0xffff880075683d98 [3630146.622987] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/file.c: CIFS VFS: in cifs_closedir as Xid: 1728679 with uid: 0 [3630146.622990] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/file.c: Freeing private data in close dir [3630146.622995] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/file.c: CIFS VFS: leaving cifs_closedir (xid = 1728679) rc = 0


Ok. Let make samba DFS root. Following samba manual on this matter, in smb.conf I've mentioned `msdfs root = yes`, `host msdfs = yes`. Although samba manual mention that this way can be done domain base DFS root, accessing \\domain.com\shares (after removing the first one from windows gui) does not find it. I think that some how, DCs must be configured about where this DFS root is located. In samba manual, there is no mention about this, nor I could found in Internet. If someone could give me hints on this - this will be the greatest idea.

Then I've tried another method. I've created DFS root on windows using its gui with folder located locally. Then I deleted the created folder and make a directory symbolic link: mklink /d d:\shares \\linuxsrv\shares

Oh, this worked good from Windows 7. Even antivirus on windows server were scanning files (it seems that all copy/write goes thru windows server). But, Windows XP cannot access such links - it does not how and would not be fixed. Second problem again with mount. The same mount command regularly give access deny, although direct mount from linuxsrv works. Its definitely not permission issue. This is the log:

[3630262.959251] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: For smb_command 4 [3630262.959262] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: Sending smb: total_len 45 [3630262.959601] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: RFC1002 header 0x23 [3630262.959656] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: cifs_sync_mid_result: cmd=4 mid=11829 state=4 [3630262.959667] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/file.c: CIFS VFS: leaving cifsFileInfo_put (xid = 1728724) rc = 0 [3630272.811880] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/cifsfs.c: Devname: //10.10.0.64/img flags: 0 [3630272.811906] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: Domain name set [3630272.811915] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: Username: mimiko [3630272.811922] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: file mode: 0x1ed dir mode: 0x1ed [3630272.812071] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 1728725 with uid: 0 [3630272.812133] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: UNC: \\10.10.0.64\img ip: 10.10.0.64 [3630272.812177] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: Socket created [3630272.812184] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x6d6 [3630272.812691] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/fscache.c: cifs_fscache_get_client_cookie: (0xffff880037188400/0xffff8800b99b2fa8) [3630272.812705] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 1728726 with uid: 0 [3630272.812711] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: Existing smb sess not found [3630272.812731] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/cifssmb.c: secFlags 0x1003 [3630272.812743] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: For smb_command 114 [3630272.812749] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: Sending smb: total_len 82 [3630272.812782] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: Demultiplex PID: 30186 [3630272.813011] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: RFC1002 header 0x6d [3630272.813039] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: cifs_sync_mid_result: cmd=114 mid=1 state=4 [3630272.813047] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/cifssmb.c: Dialect: 2 [3630272.813051] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/cifssmb.c: Must sign - secFlags 0x1003 [3630272.813056] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/cifssmb.c: negprot rc 0 [3630272.813061] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: Security Mode: 0xf Capabilities: 0x1f3fc TimeAdjust: -10800 [3630272.813066] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/sess.c: sess setup type 1 [3630272.813118] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: For smb_command 115 [3630272.813122] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: Sending smb: total_len 256 [3630272.814259] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: RFC1002 header 0xed [3630272.814281] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: cifs_sync_mid_result: cmd=115 mid=2 state=4 [3630272.814287] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release [3630272.814291] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/sess.c: UID = 22531
[3630272.814295] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/sess.c: bleft 195
[3630272.814302] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/sess.c: serverOS=Windows Server 2008 R2 Standard 7601 Service Pack 1 [3630272.814308] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/sess.c: serverNOS=Windows Server 2008 R2 Standard 6.1 [3630272.814312] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/sess.c: serverDomain=domain [3630272.814317] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/sess.c: ssetup freeing small buf ffff8800a50cd880 [3630272.814321] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: CIFS Session Established successfully [3630272.814325] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 1728726) rc = 0 [3630272.814334] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: CIFS VFS: in cifs_get_tcon as Xid: 1728727 with uid: 0 [3630272.814340] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: For smb_command 117 [3630272.814346] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: Sending smb: total_len 88 [3630272.815805] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: RFC1002 header 0x23 [3630272.815826] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: cifs_sync_mid_result: cmd=117 mid=3 state=4
[3630272.815835] Status code returned 0xc0000022 NT_STATUS_ACCESS_DENIED
[3630272.815842] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/netmisc.c: Mapping smb error code 0xc0000022 to POSIX err -13 [3630272.815848] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: CIFS VFS: leaving cifs_get_tcon (xid = 1728727) rc = -13 [3630272.815851] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: CIFS Tcon rc = -13 [3630272.815857] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: build_unc_path_to_root: full_path=\\10.10.0.64\shares [3630272.815863] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: For smb_command 117 [3630272.815868] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: Sending smb: total_len 90 [3630272.816049] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: RFC1002 header 0x38 [3630272.816098] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: cifs_sync_mid_result: cmd=117 mid=4 state=4 [3630272.816137] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: CIFS Tcon rc = 0 ipc_tid = 12294 [3630272.816145] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/cifssmb.c: In GetDFSRefer the path \10.10.0.64\shares [3630272.816154] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: For smb_command 50 [3630272.816188] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: Sending smb: total_len 106 [3630272.821586] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: RFC1002 header 0xb8 [3630272.821611] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: cifs_sync_mid_result: cmd=50 mid=5 state=4 [3630272.821621] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/cifssmb.c: Decoding GetDFSRefer response BCC: 129 Offset 56 [3630272.821626] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/cifssmb.c: num_referrals: 1 dfs flags: 0x3 ...
[3630272.821628]
[3630272.826222] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/dns_resolve.c: dns_resolve_server_name_to_ip: unable to resolve: SRV64 [3630272.826233] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/cifs_dfs_ref.c: cifs_compose_mount_options: Failed to resolve server part of \\SRV64\shares to IP: -61 [3630272.826242] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: cifs_put_smb_ses: ses_count=1
[3630272.826244]
[3630272.826248] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: CIFS VFS: in cifs_put_smb_ses as Xid: 1728728 with uid: 0 [3630272.826253] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/cifssmb.c: In SMBLogoff for session disconnect [3630272.826263] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: For smb_command 116 [3630272.826271] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: Sending smb: total_len 43 [3630272.826618] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: RFC1002 header 0x27 [3630272.826644] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/transport.c: cifs_sync_mid_result: cmd=116 mid=6 state=4 [3630272.826666] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/fscache.c: cifs_fscache_release_client_cookie: (0xffff880037188400/0xffff8800b99b2fa8) [3630272.826829] /build/linux-4wkEzn/linux-3.2.68/fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 1728725) rc = -13
[3630272.826838] CIFS VFS: cifs_mount failed w/return code = -13

Nor smbclient does work.

So this is my question. How to combine domain-based DFS root with windows and samba and mount?

Another problem with mount on second attempt is, that mount can not connect to \\domain.com only direct ip of hosting server. Again, mount does not query domain for real ips of holding servers?

--
Mimiko desu.


Reply to: