Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mount_smbfs re-exported via samba not working

4 views
Skip to first unread message

Mike Tancsa

unread,
Dec 1, 2011, 12:19:15 PM12/1/11
to
Hi,

I am trying to export a series of shares from one Windows XP box, to another so I can better control and log access and am having problems seeing the files. I am not sure if this is a samba issue or an mount_smbfs issue


The setup is

[XP-Server] -------- [FreeBSD]------[DMZ Clients]


So FreeBSD box mount_smbfs from [XP-Server], servs up the share under samab so that the DMZ clients can see it.


I can mount the windows XP file system shares no problem
eg

mount_smbfs -c u -d 777 -f 777 -O xpuser:xpuser -N //xpuser@xpserver/pricelist /export

This shows up, and I can see and create files no problem from the FreeBSD box

# mount -t smbfs
//XPUSER@XPSERVER/PRICELIST on /export (smbfs)



# ls -l /export
total 17
drwxrwxrwx 1 xpuser xpuser - 16384 Dec 31 1969 .
drwxrwxrwx 7 xpuser xpuser - 512 Dec 1 08:04 ..
-rwxrwxrwx 1 xpuser xpuser - 95 Dec 1 10:29 dd
-rwxrwxrwx 1 xpuser xpuser - 92 Dec 1 10:58 n
-rwxrwxrwx 1 xpuser xpuser - 92 Dec 1 10:33 new
-rwxrwxrwx 1 xpuser xpuser - 95 Dec 1 10:29 test
-rwxrwxrwx 1 xpuser xpuser - 436 Dec 1 10:34 test2
-rwxrwxrwx 1 xpuser xpuser - 15 Dec 1 10:22 this-is-a-test.txt


Now the problem is when I try and re-export that using samba. The files never show up on the windows PC. e.g on the other PC attached to the DMZ NIC of the FreeBSD server, I try and do something like

net use m: \\192.168.1.1\pl /user:someothersmbuser

I can map the drive, but doing a dir shows no files. if I do something like dir > test, it does actually create the file, but I still cannot see it

If I use smbclient from another FreeBSD box, also in the DMZ

%smbclient -U somesmbuser //192.168.1.1/pl

Enter somesmbuser's password:
Domain=[DMZ] OS=[Unix] Server=[Samba 3.6.1]
smb: \> dir
NT_STATUS_INVALID_HANDLE listing \*


But... I can actually read the files that I know are there and make and change into directories ??!!

smb: \> get dd
getting file \dd of size 95 as dd (1.2 KiloBytes/sec) (average 1.2 KiloBytes/sec)
smb: \> get test2
getting file \test2 of size 436 as test2 (5.6 KiloBytes/sec) (average 3.4 KiloBytes/sec)
smb: \>
smb: \> mkdir testdir
smb: \> cd testdir
smb: \testdir\> dir
NT_STATUS_INVALID_HANDLE listing \testdir\*
smb: \testdir\>

Any idea why its not working

It seems directly listings are the only things not working, even though ls sees them on the FreeBSD box.

If I export a directory in samba that just has a normal UFS file system all works just fine. Its only when I try and export the smbfs system that it does not work. I also try exporting a nullfs mounted file system and that worked, but again, only if the underlying file system was UFS, not smbfs



---Mike


--
-------------------
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, mi...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada http://www.tancsa.com/
_______________________________________________
freeb...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-fs
To unsubscribe, send any mail to "freebsd-fs-...@freebsd.org"

Peter Maloney

unread,
Dec 1, 2011, 2:48:37 PM12/1/11
to
Am 01.12.2011 18:19, schrieb Mike Tancsa:
> Hi,
>
> I am trying to export a series of shares from one Windows XP box, to another so I can better control and log access and am having problems seeing the files. I am not sure if this is a samba issue or an mount_smbfs issue
>
>
> The setup is
>
> [XP-Server] -------- [FreeBSD]------[DMZ Clients]
I am doing something like this:

FreeBSD zfs -----nfs mount -------> Linux machine -------smb
mount-------> whichever client

Note I am using NFS from FreeBSD instead of samba.

And before I added this to the linux machine's smb.conf global section,
I would get total lockups and nobody could list directories.

strict locking = no
blocking locks = no

So give that a try.

With the first setting, any tests I tried worked fine, but others
reported a similar problem, maybe when there are a few concurrent users.
With the second setting, I haven't had the same problem since. (But if I
share my .zfs directory over NFS, listing that hangs the dataset)

Mike Tancsa

unread,
Dec 1, 2011, 3:13:59 PM12/1/11
to
On 12/1/2011 2:48 PM, Peter Maloney wrote:
>
> And before I added this to the linux machine's smb.conf global section,
> I would get total lockups and nobody could list directories.
>
> strict locking = no
> blocking locks = no
>
> So give that a try.

Hi,
Thanks for the response, but it does not seem to help :( Running a session through tshark sees the same sort of response (STATUS_INVALID_HANDLE) on the request to list the directory structure

89 2.884570 192.168.1.23 -> 192.168.1.1 TCP 44 52479 > microsoft-ds [ACK] Seq=2558 Ack=1651 Win=65375 Len=0
90 2.999964 192.168.1.1 -> 192.168.1.23 TCP 56 netbios-ssn > 56189 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=1408 WS=8 SACK_PERM=1
91 7.590425 192.168.1.23 -> 192.168.1.1 SMB 146 NT Create AndX Request, Path: \test2
92 7.594526 192.168.1.1 -> 192.168.1.23 SMB 183 NT Create AndX Response, FID: 0x15cc
93 7.611333 192.168.1.23 -> 192.168.1.1 SMB 120 Trans2 Request, QUERY_FILE_INFO, FID: 0x15cc, Query File Internal Info
94 7.611725 192.168.1.1 -> 192.168.1.23 SMB 116 Trans2 Response, FID: 0x15cc, QUERY_FILE_INFO
95 7.630035 192.168.1.23 -> 192.168.1.1 SMB 118 Trans2 Request, QUERY_FS_INFO, Query FS Attribute Info
96 7.630368 192.168.1.1 -> 192.168.1.23 SMB 124 Trans2 Response, QUERY_FS_INFO
97 7.646549 192.168.1.23 -> 192.168.1.1 SMB 128 Trans2 Request, QUERY_FS_INFO, Info Allocation
98 7.647546 192.168.1.1 -> 192.168.1.23 SMB 122 Trans2 Response, QUERY_FS_INFO
99 7.663806 192.168.1.23 -> 192.168.1.1 SMB 96 Write Request, FID: 0x15cc, 0 bytes at offset 33
100 7.666261 192.168.1.1 -> 192.168.1.23 SMB 85 Write Response, FID: 0x15cc, 0 bytes
101 7.687203 192.168.1.23 -> 192.168.1.1 SMB 145 Write AndX Request, FID: 0x15cc, 33 bytes at offset 0
102 7.687910 192.168.1.1 -> 192.168.1.23 SMB 95 Write AndX Response, FID: 0x15cc, 33 bytes
103 7.704950 192.168.1.23 -> 192.168.1.1 SMB 148 Write AndX Request, FID: 0x15cc, 36 bytes at offset 33
104 7.705559 192.168.1.1 -> 192.168.1.23 SMB 95 Write AndX Response, FID: 0x15cc, 36 bytes
105 7.722181 192.168.1.23 -> 192.168.1.1 SMB 114 Write AndX Request, FID: 0x15cc, 2 bytes at offset 69
106 7.722782 192.168.1.1 -> 192.168.1.23 SMB 95 Write AndX Response, FID: 0x15cc, 2 bytes
107 7.738991 192.168.1.23 -> 192.168.1.1 SMB 133 Write AndX Request, FID: 0x15cc, 21 bytes at offset 71
108 7.739616 192.168.1.1 -> 192.168.1.23 SMB 95 Write AndX Response, FID: 0x15cc, 21 bytes
109 7.757164 192.168.1.23 -> 192.168.1.1 SMB 134 Trans2 Request, FIND_FIRST2, Pattern: \*
110 7.758395 192.168.1.1 -> 192.168.1.23 SMB 83 Trans2 Response, FIND_FIRST2, Error: STATUS_INVALID_HANDLE
111 7.775637 192.168.1.23 -> 192.168.1.1 SMB 89 Close Request, FID: 0x15cc
112 7.778383 192.168.1.1 -> 192.168.1.23 SMB 83 Close Response, FID: 0x15cc
113 7.913181 192.168.1.23 -> 192.168.1.1 TCP 44 52479 > microsoft-ds [ACK] Seq=3445 Ack=2343 Win=64683 Len=0
114 8.999957 192.168.1.1 -> 192.168.1.23 TCP 56 netbios-ssn > 56189 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=1408 WS=8 SACK_PERM=1
115 9.134924 192.168.1.23 -> 192.168.1.1 SMB 118 Trans2 Request, QUERY_FS_INFO, Query FS Attribute Info
116 9.135305 192.168.1.1 -> 192.168.1.23 SMB 124 Trans2 Response, QUERY_FS_INFO
117 9.156648 192.168.1.23 -> 192.168.1.1 SMB 134 Trans2 Request, FIND_FIRST2, Pattern: \*
118 9.157972 192.168.1.1 -> 192.168.1.23 SMB 83 Trans2 Response, FIND_FIRST2, Error: STATUS_INVALID_HANDLE
119 9.321949 192.168.1.23 -> 192.168.1.1 TCP 44 52479 > microsoft-ds [ACK] Seq=3609 Ack=2462 Win=64564 Len=0
120 10.328172 192.168.1.23 -> 192.168.1.1 SMB 87 Logoff AndX Request
121 10.328562 192.168.1.1 -> 192.168.1.23 SMB 87 Logoff AndX Response
122 10.344914 192.168.1.23 -> 192.168.1.1 SMB 83 Tree Disconnect Request
123 10.345600 192.168.1.1 -> 192.168.1.23 SMB 83 Tree Disconnect Response
124 10.527992 192.168.1.23 -> 192.168.1.1 TCP 44 52479 > microsoft-ds [ACK] Seq=3691 Ack=2544 Win=64482 Len=0


---Mike

--
-------------------
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, mi...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada http://www.tancsa.com/
0 new messages