View Full Version : Samba connection problem
doctorwhite
25th April 2009, 07:27 PM
I am having trouble connecting to a windows share from my fedora box. I would type smbtree and get this:
Connecting to host=BROWNIE
resolve_lmhosts: Attempting lmhosts lookup for name BROWNIE<0x20>
resolve_wins: Attempting wins lookup for name BROWNIE<0x20>
resolve_wins: using WINS server 127.0.0.1 and tag '*'
Negative name query response, rcode 0x03: The name requested does not exist.
resolve_hosts: Attempting host lookup for name BROWNIE<0x20>
resolve_hosts: getaddrinfo failed for name BROWNIE [Name or service not known]
name_resolve_bcast: Attempting broadcast lookup for name BROWNIE<0x20>
cli_start_connection: failed to connect to BROWNIE<20> (0.0.0.0). Error NT_STATUS_BAD_NETWORK_NAME
Here is my smb.conf:
[doctorwhite@localhost ~]$ testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[Music]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = KABILITY
netbios name = DOCTORWHITE
server string = Samba Server Version %v
interfaces = lo, eth0
security = SHARE
map to guest = Bad User
smb passwd file = /etc/samba/smbpasswd
passdb backend = tdbsam
guest account = guest
log level = 3
log file = /var/log/samba/log.%m
max log size = 50
load printers = No
os level = 33
preferred master = Yes
wins support = Yes
guest ok = Yes
hosts allow = 127., 192.168.1.0/24
[Music]
comment = Music
path = /media/seadata/depot/Music/Albums
[doctorwhite@localhost ~]$
Any help would be appreciated.
glennzo
25th April 2009, 07:52 PM
I would put the ip address and hostname of the Widows box into /etc/hosts and restart samba.
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.1.100 brownie <-- assumption
/sbin/service smb restart
/sbin/service nmb restart
See if this changes things.
doctorwhite
25th April 2009, 08:12 PM
Seemed to make it worse. Adding 192.168.1.103 brownie does not help. I get this message:
[doctorwhite@localhost ~]$ smbtree
added interface lo ip=127.0.0.1 bcast=127.255.255.255 netmask=255.0.0.0
added interface eth0 ip=192.168.1.104 bcast=192.168.1.255 netmask=255.255.255.0
Password:
tdb(unnamed): tdb_open_ex: could not open file /var/lib/samba/gencache.tdb: Permission denied
resolve_lmhosts: Attempting lmhosts lookup for name KABILITY<0x1d>
name_resolve_bcast: Attempting broadcast lookup for name KABILITY<0x1d>
Got a positive name query response from 127.0.0.1 ( 192.168.1.104 )
Connecting to host=192.168.1.104
Connecting to 192.168.1.104 at port 445
name_resolve_bcast: Attempting broadcast lookup for name __MSBROWSE__<0x1>
Got a positive name query response from 127.0.0.1 ( 192.168.1.104 )
resolve_lmhosts: Attempting lmhosts lookup for name KABILITY<0x1d>
name_resolve_bcast: Attempting broadcast lookup for name KABILITY<0x1d>
Got a positive name query response from 127.0.0.1 ( 192.168.1.104 )
Connecting to host=192.168.1.104
Connecting to 192.168.1.104 at port 445
KABILITY
resolve_lmhosts: Attempting lmhosts lookup for name KABILITY<0x1d>
name_resolve_bcast: Attempting broadcast lookup for name KABILITY<0x1d>
Got a positive name query response from 127.0.0.1 ( 192.168.1.104 )
Connecting to host=192.168.1.104
Connecting to 192.168.1.104 at port 445
\\DOCTORWHITE Samba Server Version 3.2.11-0.30.fc10
Connecting to host=DOCTORWHITE
resolve_lmhosts: Attempting lmhosts lookup for name DOCTORWHITE<0x20>
resolve_wins: Attempting wins lookup for name DOCTORWHITE<0x20>
resolve_wins: using WINS server 127.0.0.1 and tag '*'
Got a positive name query response from 127.0.0.1 ( 192.168.1.104 192.168.1.105 192.168.0.199 192.168.0.104 )
Connecting to 192.168.1.104 at port 445
rpc_pipe_bind: Remote machine DOCTORWHITE pipe \srvsvc fnum 0x7198 bind request returned ok.
\\DOCTORWHITE\IPC$ IPC Service (Samba Server Version 3.2.11-0.30.fc10)
\\DOCTORWHITE\Music Music
\\BROWNIE
Connecting to host=BROWNIE
resolve_lmhosts: Attempting lmhosts lookup for name BROWNIE<0x20>
resolve_wins: Attempting wins lookup for name BROWNIE<0x20>
resolve_wins: using WINS server 127.0.0.1 and tag '*'
Negative name query response, rcode 0x03: The name requested does not exist.
resolve_hosts: Attempting host lookup for name BROWNIE<0x20>
resolve_hosts: getaddrinfo failed for name BROWNIE [Name or service not known]
name_resolve_bcast: Attempting broadcast lookup for name BROWNIE<0x20>
cli_start_connection: failed to connect to BROWNIE<20> (0.0.0.0). Error NT_STATUS_BAD_NETWORK_NAME
I recently got a d-link dir 655 router and wonder if its causing the problems.
glennzo
25th April 2009, 09:01 PM
Here's the smb.conf on this particular computer. This is a mixed Linux / Windows home network.
#======================= Global Settings =====================================
[global]
workgroup = JOHNSON
server string = Samba Server Version %v
netbios name = COOLHAND
log file = /var/log/samba/log.%m
max log size = 50
security = share
#============================ Share Definitions ==============================
[temp]
Comment = Temporary Share Space
path = /temp
public = yes
writeable = yes
browseable = yes
Simple and effective as far as I'm concerned. Here's smbtree.
[glenn@coolhand ~]$ smbtree
Password:
JOHNSON
\\SLOWHAND Samba Server Version 3.2.11-0.28.fc9
\\SLOWHAND\IPC$ IPC Service (Samba Server Version 3.2.11-0.28.fc9)
\\SLOWHAND\freeagent FreeAgent Desktop Drive
\\SLOWHAND\repof10 Fedora 10 Repository
\\SLOWHAND\temp Shared Folder
\\MEG Meagans Computer
\\MEG\C$ Default share
\\MEG\ADMIN$ Remote Admin
\\MEG\C
\\MEG\IPC$ Remote IPC
\\MEG\My Documents
\\JOHNPAULJONES Samba Server Version 3.2.11-0.30.fc10
\\JOHNPAULJONES\IPC$ IPC Service (Samba Server Version 3.2.11-0.30.fc10)
\\JOHNPAULJONES\temp Temporary Shared Space
\\COOLHAND Samba Server Version 3.2.11-0.30.fc10
\\COOLHAND\IPC$ IPC Service (Samba Server Version 3.2.11-0.30.fc10)
\\COOLHAND\temp Temporary Share Space
All Linux boxes except the one named Meg (XP). Some of the computers are not booted right now. Here's my /etc/hosts file.
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 coolhand localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.1.100 meg
192.168.1.101 coolhand
192.168.1.102 johnbonham
192.168.1.103 meagan-laptop
192.168.1.104 johnpauljones
192.168.1.105 slowhand
192.168.1.109 mom
192.168.1.112 borkedbox
Correct or not this works well and it works consistently for me.
doctorwhite
26th April 2009, 06:53 PM
I added the xp machine to /etc/hosts and smbtree fully authenticates all machines and smb:/ works as well too. What I do not understand is that I use to be able to browse all machines w/o modifying /etc/hosts. Now I have to. The only culprit could be my new router, D-LINK DIR 655. Any ideas?
glennzo
26th April 2009, 07:09 PM
No ideas. I'm not that much of a samba guru, just know what I've been doing with networking Linux / Windows for several years now. Right or wrong, this is what's been working for a long time now.
doctorwhite
6th May 2009, 11:58 PM
Now I cant browse my network at all. I get this error message:
the given name could not be resolved to a unique server. make sure your network is setup without any name conflicts between names used by windows and by unix name resolution.
via smb://kability/
i modified /etc/hosts too.
glennzo
7th May 2009, 12:33 AM
Sometimes the nmb service dies. Don't know why. Whenever it does my local network is flawed. Do this in a terminal.
/sbin/service nmb status
You should see this, nmbd (pid 1893) is running.... If the service is dead, do this,
sudo /sbin/service nmb restart
Try to browse your network. All should be well if nmb was the culprit.
Also, make sure smb is running. Same way you did it with nmb, /sbin/service smb status, sudo /sbin/service smb restart if necessary.
doctorwhite
7th May 2009, 03:19 AM
SMB and NMB status are fine. Same error message.
scottro
7th May 2009, 04:15 AM
Hrrm.
Ok, what happens when you ping brownie. Do you get a response from 192.168.1.103?
(Of course not sure what Windows does these days, it might block pings by default.)
What are the permissions on brownie? Can brownie connect to Fedora?
Actually, this is more of a smbclient thing rather than something that might be in smb.conf. That is, the Fedora box uses smbclient to connect to a Windows machine. smb.conf would be for a Windows machine connecting to a Linux machine.
Lets say you have a share on brownie called Music. What happens if you try something like
mount.cifs -I 192.168.1.103 //doctorwhite@brownie/Music /mountpoint
(That's assuming doctorwhite is your username on brownie and /mountpoint refers to a directory you create in your home directory as a place to mount brownie).
Also, there is probably a document on your system, called something like Samba-HOWTO-Collection.pdf. That has some useful troubleshooting tips.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.