Windows shared folders in suse

I found this tutorial and ran through it to setup Samba.

Samba and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network. Versions 10, 11

it seemed to work. It found my workgroup and it even sees the windows PC on my network that I am trying to access files on but it doesn’t seem to find the shared folders on there.

I tried, as the tutorial suggested, restarting samba and now I am getting an error message that states,

unable to find any workgroups in your network this might be caused by an enable firewall

It was seeing the PC a moment ago so I’m not sure why it changed and windows firewall is disabled on the other PC so that shouldn’t be causing any problems. I also have gone through the steps of opening the firewall on the Suse end to allow samba. I’m a bit baffled at this point. Any ideas?

Windows firewall by default allows samba. openSUSE’s doesn’t. Try it without the openSUSE firewall switched off – to see if it is a problem with the openSUSE firewall. Run this command in a terminal window:

sudo /sbin/rcSuSEfirewall2 stop

Note: it’s case sensitive. That will turn it off until you next boot the machine. So with it off, does browsing improve?

I shut down the firewall and it does see the workgroup but now doesn’t see the other PC or, obviously, it’s shared folders.

Can you please run these three commands and post here the returns you get from the commands:

testparm -s
smbtree -N
/sbin/chkconfig | egrep "nmb|smb"

testparm -s

Load smb config files from /etc/samba/smb.conf
Processing section “[homes]”
Processing section “[profiles]”
Processing section “[users]”
Processing section “[groups]”
Processing section “[printers]”
Processing section “[print$]”
Loaded services file OK.
Server role: ROLE_DOMAIN_MEMBER
[global]
workgroup = HOME
security = DOMAIN
map to guest = Bad User
printcap name = cups
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
logon path = \%L\profiles.msprofile
logon drive = P:
logon home = \%L%U.9xprofile
domain master = No
usershare max shares = 100
cups options = raw
include = /etc/samba/dhcp.conf

[homes]
comment = Home Directories
valid users = %S, %D%w%S
read only = No
inherit acls = Yes
browseable = 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

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

smbtree -n

HOME
\MEDIAPC Media PC
Receiving SMB: Server stopped responding
failed negprot
\LINUX-FBGC Samba 3.2.7-11.3.2-2154-SUSE-CODE11
\LINUX-FBGC\IPC$ IPC Service (Samba 3.2.7-11.3.2-2154-SUSE-CODE11)
\LINUX-FBGC\print$ Printer Drivers
\LINUX-FBGC\groups All groups
\LINUX-FBGC\users All users
\LINUX-FBGC\profiles Network Profiles Service

/sbin/chkconfig | egrep “nmb/smb”

nmb on
smb on
smbfs on

You’ve set this up for the openSUSE machine to be a member of a domain controlled by a Windows Server (like windows server 2000/2003/2007 etc), like for a government department or maybe a business with 30 machines. Did you intend that, or did you intend for normal home networking?

Just normal homes networking. How do I go about fixing that?

You can open the GUI editor for the file smb.conf (with root priviliges) with one of these commands:

  • KDE users: kdesu kwrite /etc/samba/smb.conf
  • Gnome suers: gnomesu gedit /etc/samba/smb.conf

Then change these lines

[global]
workgroup = HOME
security = DOMAIN
map to guest = Bad User
printcap name = cups
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
logon path = \\%L\profiles\.msprofile
logon drive = P:
logon home = \\%L\%U\.9xprofile
domain master = No
usershare max shares = 100
cups options = raw
include = /etc/samba/dhcp.conf

to this:

[global]
workgroup = HOME
netbios name = PUT_PREFERRED_NAME_HERE
name resolve order = bcast host lmhosts wins
server string = ""
map to guest = Bad User
local master = yes
preferred master = yes
os level = 65
usershare allow guests = Yes
usershare max shares = 100
usershare owner only = False

Keep the firewall off [Yast → Security & Users → Firewall → Disable Firewall Auto Starting]. You can turn it on again after everything is working.

Then reboot all the machines in sequence. Then do the reboot again in same sequence (that gets them all talking and they elect the Linux box as the Browse Master).

When I open that it looks a little bit different then what you posted. It reads like this:

[global]
workgroup = HOME
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \%L\profiles.msprofile
logon home = \%L%U.9xprofile
logon drive = P:
usershare allow guests = No
security = domain
usershare max shares = 100
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = No
domain master = No
passdb backend = smbpasswd
wins support = No
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[profiles]
comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700
[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
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

Share disabled by YaST

[netlogon]

I know you’re saying to change that first section. If I just delete that and paste in what you put there will that work or am I just changing selected portions of it?

All of [global]. You can paste OK.

You might as well take the [groups] stanza out too, because /home/groups doesn’t exist. [it’s just a suggested possibility from the openSUSE developers.

And you might as well take out the [profiles] stanza too because that’s really for a domain situation and kind of duplicates [homes]

For more on these default shares, have a look here: The Suse/openSUSE Default Shares

If later you want to write your own shares, have a look here: Defining and Using File Shares (Services)

I am experiencing similar problems getting samba to grab hold of my windows XP share. I have poured over many posts and edited my smb.conf file numerous times. right now, I can see the XP share by using smbtree from a su prompt - all of the shared directories appear; however, when I try to view the samba shares in dolphin, I get a message at the bottom of the screen, “could not connect to host for smb://smb-network/”
I have turned off the Suse firewall and the XP firewall.
here’s my smb.conf:

[global]
netbios name = DPF
workgroup = @HOMENETWORK
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
#logon path = \%L\profiles.msprofile
#logon home = \%L%U.9xprofile
#logon drive = P:
usershare allow guests = Yes
name resolve order = bcast host lmhosts wins

So, it seems to be working now but only with the firewall switched off. If the firewall is on it won’t work. I thought I added the exceptions it needed for that. How do I get the firewall to function properly now?

Do these three steps, all using Yast –> Security & Users –> Firewall:
Step 1: place you network interface/s in the external zone
Step 2: add Samba Server and Netbios Server to the “Allowed Services”
Step 3: In the “Broadcast” section , add your trusted network to enable tracking of broadcast replies on Samba connections

These three steps are explained fully with pics in the Appendix to this tutorial:
SuSEfirewall2: HowTo open Ports for Services in the Suse / openSUSE Firewall

You can run smbtree without su permissions

Probably a good idea to add these to [global]

preferred master = yes
os level = 33

and reboot the whole LAN, one at a time in sequence, twice.

And I can’t say whether Dolphin can yet see shares properly, maybe try Konqueror or Nautilus if the above doesn’t stimulate viewing of shares in Dolphin.

You can run smbtree without su permissions

Probably a good idea to add these to [global]

preferred master = yes
os level = 33

and reboot the whole LAN, one machine at a time in sequence, twice.

And I can’t say whether Dolphin can yet see shares properly, it wasn’t much good in 11.0, maybe try Konqueror or Nautilus if the above doesn’t stimulate viewing of shares in Dolphin.

PS if this file doesn’t have real content: /etc/samba/dhcp.conf, you might as well comment out the reference to it.

I actually went through that same tutorial prior to doing this. I double checked and have already done all three of the things you suggested. It still seems to only work with the firewall shut down.

OK lets check a few things. Please post back here the results you get from these commands:

cat /etc/SuSE-release
cat /etc/sysconfig/SuSEfirewall2 | egrep "RELATED_EXT=|FW_LOAD_MODULES="
cat /etc/sysconfig/SuSEfirewall2 | egrep "FW_CONFIGURATIONS_EXT=|FW_DEV_EXT="

These are a bit tricky so you might have to paste them into the command window.

And I forgot this one – do it too:

sudo /sbin/ifconfig | grep "inet addr" | grep Bcast

Thanks swerdna. I’m away from the PC right now but I’ll post those items as soon as I get home. Everything is working well so far besides that and so thanks for all the help so far.