Samba share browsing not working but then it does

Hi,

I am very confused. My samba seems to be mis-configured somehow. I had been using Ubuntu 10.04 and my samba browsing of my samba shares on my HTPC (running XBMCLive) had all been working fine. Then I upgraded to openSuSE 11.2 64bit. Great OS by the way!

Ok so I chekced my other PC’s running Ubuntu and going to the network folder I see my XBMCLive machine. Double click him and now I see my shares on that PC. So now I know its specific to my SuSE install.

Now on SuSE if I use Dolphin file manager and go to Network -> Samba Shares -> workgroup I dont see anything. And then down the bottom of the window I will see timeout error on workgroup. “workgroup” is the correct workgroup. All the services are running winbind, smbd, nmbd, xinit, swat. Firewall disabled.

However when I try the above and I get the timeout error I then go to the address bar in Dolphin where it has smb as the drop down item and in the text field type in the XBMCLive PC ip address and hit enter. Then immediately I can see my shares!!! So it is working but I cant see my shares under Network->Samba Shares->workgroup.

I notice in my samba error logs for log.smbd I keep seeing this;
smbd_open_once_socket: open_socket_in: Address already in use

Anyone know why I cant see my shares under the network?

Appreciate any help.

Let’s check the firewall. Can you run these two console commands to check the status re Samba and report back here:

  • sudo /sbin/rcSuSEfirewall2 status
  • cat /etc/sysconfig/SuSEfirewall2 | egrep “FW_CONFIGURATIONS_EXT=|FW_DEV_EXT=”

And a further thought: can you run this command in each distro, opemSUSE and Ubuntu:

testparm -s

and copy the results back here so we can see if you’re using mixed forms of name resolution.

sorry for taking so long to reply. Been out of town.

Ok first output is:

Checking the status of SuSEfirewall2 unused

Second out is:

FW_DEV_EXT=“eth0”
FW_CONFIGURATIONS_EXT=“cups netbios-server samba-client samba-server sshd”

Yep so here is the output from a Ubuntu machine:

[global]
server string = %h server (Samba, Ubuntu)
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = Enter\snew\s\spassword:* %n
Retype\snew\s\spassword:* %n
password\supdated\ssuccessfully .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No
browsable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

And here is output from my SUSE 11.2 OS:

[global]
map to guest = Bad User
passdb backend = smbpasswd
printcap name = cups
logon path = \%25L\profiles.msprofile
logon drive = P:
logon home = \%25L%25U.9xprofile
domain master = No
usershare allow guests = Yes
cups options = raw

[homes]
comment = Home Directories
valid users = %S, %D%w%S
read only = No
inherit acls = Yes
browseable = No
browsable = No

[profiles]
comment = Network Profiles Service
path = %H
read only = No
create mask = 0600
directory mask = 0700
store dos attributes = Yes

[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/

[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes

[printers]
comment = All Printers
path = /var/tmp
create mask = 0600
printable = Yes
browseable = No
browsable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin, root
force group = ntadmin
create mask = 0664
directory mask = 0775

[p5qpro_downloads]
comment = Paul’s current downloads…
path = /home/drp/Downloads
force user = drp
force group = drp
create mask = 0777
directory mask = 0777

The firewall is correctly configured for Samba. It’s off at the moment and you can safely turn it on without harming the situation.

Let’s assume that the naming daemon is working because you said so (you can double check by running this command: sudo /usr/sbin/rcnmb status)

That leaves an inadequate configuration of the [global] stanza/s for a match between Ubu and openSUSE. I suggest that you make backup copies of the files smb.conf on both machines and then edit them to get better-matching configs, putting these in place of the existing [global] stanzas:

[global]
workgroup = WORKGROUP
netbios name = name_of_this_workstation
name resolve order = bcast host lmhosts wins
server string =
printing = cups
printcap name = cups
passdb backend = tdbsam
printcap cache time = 750
cups options = raw
use client driver = yes
map to guest = Bad User
local master = yes
os level = 33
usershare allow guests = Yes
usershare max shares = 100
usershare owner only = False

For each you would give a different netbios name. And if you’ve set Samba passwords, you’d need to re-do them.

Reboot one completely, then the other completely, then the first completely, then the other completely (makes them get acquainted quickly).

And these should be edited out of the file for openSUSE as not used:

[profiles]
comment = Network Profiles Service
path = %H
read only = No
create mask = 0600
directory mask = 0700
store dos attributes = Yes

[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/

[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes

But there’s something missing here, the HTPC, what OS is running on that?

Well I am happy to announce that the problem has been solved.

I am using my smb.conf file that I use on all my ubuntu machines but with one small edit to the config file.

Originally I had this line

name resolve order = wins lmhosts bcast host

But then changing that line to this and using on SUSE works now :slight_smile:

name resolve order = bcast host lmhosts wins

Thank you swerdna for your suggested config for global settings. I might not have figured this out.

Question I have now is why does SUSE have issues where Ubuntu does not? Either way I am now a happy SUSE user lol!

The “name resolve order” sets out the method used to find computers on the LAN. Ubu uses wins (a wins server) as the first port of call (which is wrong because you don’t have a wins server operating) then it uses the lmhosts file (which is wrong because you haven’t configured the lmhosts files) then it uses broadcasts (which is right). So Ubuntu is actually configured badly.

Thus the answer to your question is: You had two types of configuration for name resolution, something had to give out and it was Suse. The Ubu config is still wrong but Suse is coping now that you’ve set it to use broadcasts.

Well thanks again. Now I have all my answers. FYI - I have changed my samba config on all my PC’s to match the solution in this thread and all are working happily.