Unsure about Samba

Hello everybody,

My first post to this forum! By reading through all Samba-related threads I still cannot be sure whether my Samba is set up as it should. Mostly, it works however.

I have an old pc running Opensuse 11.1 as a Samba server to store mp3 and photo files. As workstations I have one Opensuse 11.1 and two Windows machines around the house. These are all connected to a router which assigns ip:s dynamically from the 192.168.1.0/24 subnet. Pinging works between all machines.

Windows machines can see both my Suse server and workstation in the network neighborhood and can access the Samba-share without problems. However, when in either of the Suses I type smb:/ on Konqueror I get an error message: “No workgroups on your local network. This may be due to firewall settings” (a free translation into english). I have configured firewall according to the tutorial on swerdna’s great website. Shutting down the firewall doesn’t change the situation. Then, if I use the server’s ip-address on Konqueror (smb://192.168.1.100/), the Suse workstation can access the share - whether it be on a win2000- or samba-machine.

I have been struggling with Samba few days now and have studied swerdna’s site and other sources. I thought yesterday that everything is finally ok, as I was able to see my workgroup “Rose” when browsing to smb:/ Now I can’t.

The core question now is: is this normal behaviour? Can I trust on my settings now and start to utilize the setup? Do I simply have to use ip:s instead of hostnames to create shortcuts to shares etc.?

Are you relying only on the samba config to provide workstation names? If samba share browsing works with IP addresses and the pc’s are included in your /etc/hosts file, then it should work by hostname.

Hello hmcn, and welcome to the Forums.

If the firewall being on or off makes no difference, it looks like the firewall is OK. It looks to me like maybe Name Resolution is not working.
Please check that the naming daemon is running. This command should return “running”:

sudo /usr/sbin/rcnmb status

. Probably it’s running but check anyway.

Can you post here the smb.conf file from your Suse server. This command will list it and you can then copy/paste it here:

cat /etc/samba/smb.conf

Thanks

Thank you for your attention. ‘rcnmb status’ returns ‘running’ as you expected.

My server’s smb.conf is below. Originally I tried to set up samba by using SWAT, but have then used yast and directly edited smb.conf
.

Samba config file created using SWAT

from UNKNOWN (j��O|����b��%�N▒u�`������&�)

Date: 2009/01/26 22:55:19

[global]
workgroup = ruusu

interfaces = eth0

    map to guest = Bad User
    printcap name = cups

logon path = \%L\profiles.msprofile

logon drive = P:

logon home = \%L%U.9xprofile

    usershare allow guests = Yes
    cups options = raw

include = /etc/samba/dhcp.conf

    netbios name = PERUNAMAA
    name resolve order = bcast host lmhosts wins
    os level = 33

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

Share disabled by YaST

[profiles]

comment = Network Profiles Service

path = %H

read only = No

create mask = 0600

directory mask = 0700

store dos attributes = Yes

Share disabled by YaST

[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

Share disabled by YaST

[printers]

comment = All Printers

path = /var/tmp

create mask = 0600

printable = Yes

browseable = No

Share disabled by YaST

[print$]

comment = Printer Drivers

path = /var/lib/samba/drivers

write list = @ntadmin, root

force group = ntadmin

create mask = 0664

directory mask = 0775

[varasto]
comment = Musiikki- ja kuvavarasto

inherit acls = Yes

    path = /home/Varasto
    read only = No
    guest ok = yes
    force user = heikki

Simple, isn’t it? Later I’ll comment out all shares but [varasto].

NigmaToolin’s comment about hostnames sounds to make sense, but to me it comes as a new issue in this Samba-context.

I can’t see anything wrong with smb.conf.
All I can do is make some general comments:

Fot the [groups] share to work, you would have to create directory “group” at /home/group and make the permissions drwxrwxrwx.

You need these lines in the other Suse machine too:
netbios name = something_different
workgroup = ruusu
name resolve order = bcast host lmhosts wins
os level = 33
map to guest = Bad User

I have seen improvement if you put the os level in the server machine to 65 and add the line:
preferred master = yes
You can put that line in only one Linux machine in your Workgroup.

Check also in Yast firewall settings → Allowed services → both Netbios server and Samba server are listed (in 11.1). Plus in Broadcast =>

External Zone Samba Browsing Subnet: 192.168.1.0/24 

Users have been added to the samba user database.

Normally the force user (heikki) would be the owner of the directory Varasto.

The [homes] share would not normally be visible in Linux because of the entry:
browseable = No
all
Even though none of these (except the firewall settings) should stop you seeing one Suse from the other, it’s as well to consider them.

Thank you for your advice. I’ll comment [groups] share away.

You need these lines in the other Suse machine too:
netbios name = something_different
workgroup = ruusu
name resolve order = bcast host lmhosts wins
os level = 33
map to guest = Bad User

I’ll check later when I get back home, but as far as I can remember this is what I have.

I have seen improvement if you put the os level in the server machine to 65 and add the line:
preferred master = yes
You can put that line in only one Linux machine in your Workgroup.

I’ll try.

Check also in Yast firewall settings → Allowed services → both Netbios server and Samba server are listed (in 11.1). Plus in Broadcast =>

External Zone Samba Browsing Subnet: 192.168.1.0/24 

Thanks to your site, I’ve got it this way.

Users have been added to the samba user database.

yes

Normally the force user (heikki) would be the owner of the directory Varasto.

I don’t remember. Propably I created it as root. But this shouldn’t affect the visibility of workgroup. Or should it?

The [homes] share would not normally be visible in Linux because of the entry:
browseable = No
all
Even though none of these (except the firewall settings) should stop you seeing one Suse from the other, it’s as well to consider them.

I’ll comment out this homes-share later.

I’m starting to be suspicious about my TP-LINK router…

Every so often, when I can’t figure out why my browsing has stopped, I suddenly remember to reboot everything, including a modem, switch and wireless router that make up the network. Then it works again (cheap hardware).

Now it seems to be working!:slight_smile:

I added options ‘local master = yes’ and ‘preferred master = yes’ on server’s smb.conf and Now I can see my workgroup on both Suse machines. Everything really works smoothly now.

Thank you very much for your kind help. My next challenge is to hide this server into a cupboard and manage it remotely. Should be easy…

Glad you got a good result.