Linux – How to list shares on a Windows machine using Samba? (error NT_STATUS_ACCESS_DENIED)

file-sharinglinuxsambawindows-xp

I want to find out about the Windows XP "shares" on my wife's windows machine by browsing from my Linux machine using Samba. I am relatively clueless about both windows and samba. I tried a basic operation from the command line and got this error:

: nr@homedog 8088 ; smbclient -L sapphire
timeout connecting to 140.247.184.252:445
timeout connecting to 140.247.184.252:139
Connection to sapphire failed (Error NT_STATUS_ACCESS_DENIED)

I've Googled this error message and have determined that a lot of people have similar problems, but I can't find a workaround. I suspect my wife has to grant some sort of access or permission on the Windows side. Any suggestions?

Best Answer

OK, it turns out the problem was with the Samba smb.conf configuration file. The NetBIOS name of my wife's machine happened to coincide with the hostname of a machine on a network searched in my /etc/resolv.conf. For some reason Samba requests and Nautilus were going to this machine instead of to the machine on the local net.

I fixed the problem by telling /etc/resolv.conf not to search the offending domain. At this point smbclient -L started working and so did remote mounts from Nautilus.