problem with Samba Server

i followed the sticky (along with other various walkthroughts for opensuse 11.1) on how to set up the samba share for windows network but when i go to my laptop (which runs windows) i can’t access anything

help appreciated

Dave

Kotomine wrote:

>
> i followed the sticky (along with other various walkthroughts for
> opensuse 11.1) on how to set up the samba share for windows network
> but when i go to my laptop (which runs windows) i can’t access
> anything
>
> help appreciated
>
> Dave
>
>
might be beneficial to post the sticky you’re refering to

Suse 11.1 x64, Kde 4.2beta (unstable repo), Opera 9.x weekly

Have you added any samba users with smbpasswd -a?

well i am pretty new to linux so, i just found a how to and followed it and the machines running windows can only see my the linux computer but when clicked on windows says the computer doesn’t exist. In other-words i am kinda lost here.

I’m assuming this is openSUSE version 11.1 we’re talking about? Yes?

Can you please give us the following diagnostic information. Open a console/terminal window and enter the commands below. Then copy/paste the full dialogue you get in the terminal window back here into a reply post:

cat /etc/samba/smb.conf

that should telll us if you’ve configured samba to broadcast it’s resources out to windows machines

cat /etc/sysconfig/SuSEfirewall2 | egrep "FW_SERVICES_ACCEPT_RELATED_EXT|FW_CONFIGURATIONS_EXT"

that should tell us if you’ve configured the firewall to allow Samba through

cat /etc/sysconfig/SuSEfirewall2.d/services/samba-server | egrep "UDP=|BROADCAST="

that should tell us if you fixed a bug in 11.1 firewall GUIs properly

Complicated expressions – might be easiest to use your mouse to copy them from the browser and use Edit → Paste in the console window to enter them.

Luck

sorry this took so long i have pretty hectic work hours and yes its suse 11.1.

cat /etc/samba/smb.conf

smb.conf is the main Samba configuration file. You find a full commented

version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the

samba-doc package is installed.

Date: 2008-12-03

[global]
workgroup = WORKGROUP
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
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = No
domain master = No
security = user
netbios name = Server
usershare max shares = 100
[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]

comment = Network Logon Service

path = /var/lib/samba/netlogon

write list = root

[data]
inherit acls = Yes
path = /srv
read only = No

cat /etc/sysconfig/SuSEfirewall2 | egrep "FW_SERVICES_ACCEPT_RELATED_EXT|FW_CONFIGURATIONS_EXT"

EPT_RELATED_EXT|FW_CONFIGURATIONS_EXT"
FW_CONFIGURATIONS_EXT=“samba-server”

see comments for FW_CONFIGURATIONS_EXT

see comments for FW_CONFIGURATIONS_EXT

FW_SERVICES_ACCEPT_RELATED_EXT=“0/0,udp,137”

see FW_SERVICES_ACCEPT_RELATED_EXT

see FW_SERVICES_ACCEPT_RELATED_EXT

e.g. FW_SERVICES_ACCEPT_RELATED_EXT

See also FW_SERVICES_ACCEPT_RELATED_EXT

cat /etc/sysconfig/SuSEfirewall2.d/services/samba-server | egrep "UDP=|BROADCAST="

UDP=“netbios-ns netbios-dgm”
BROADCAST=""

The first diagnostic you gave us:

The file smb.conf is Samba’s main configuration file. It’s a text file. You can open it for editing by opening a console and entering this command if you run KDE:

kdesu kwrite /etc/samba/smb.conf

or if you run Gnome use this:

gnomesu gedit /etc/samba/smb.conf

There’s a “paragraph” of settings collected under the heading [global]. Add these three lines in there under the line [global]:

name resolve order = bcast host lmhosts wins
preferred master = yes
os level = 65

Reference: Enhance Browsing with a Local Master Browser

This set of lines for the share “data” looks dodgy:

[data]
inherit acls = Yes
path = /srv
read only = No

If you tell me what you were trying to achieve there, I might be able to advise some improvements.

The second diagnostic you gave us: That’s OK

The third diagnostic you gave us: There’s a bug in the firewall configuration in openSUSE 11.1. Two lines are broken in a text file that configures the firewall for Samba. You have fixed one of them by using the sticky you referred to but missed one of them while you were there. Can you go back to the process and change a line in the text file “samba-server” which is located at: /etc/sysconfig/SuSEfirewall2.d/services/samba-server. Change this line:

BROADCAST=""

to this:

BROADCAST="netbios-ns netbios-dgm"

The method is in the sticky at top of the Networking Forum. But this reference is much clearer I think: Firewall fix for openSUSE 11.1

You will be asked for credentials when you access some of the Linux shares. You need to add your username to the Samba user database. Then you can supply your credentials. Open a console and enter this command and then supply passwords when asked:

sudo smbpasswd -a your_username

Reference: Permission to Access Suse/openSUSE Default Shares

A reboot of both openSUSE and windows is a good idea after all this, and have a cup of tea (or a beer) while they chat and get acquainted (i.e. exchange protocols etc).

I’m moving this thread to the networking forum. Better spot for it.

[data]
inherit acls = Yes
path = /srv
read only = No 

/srv is the mount point for my volume group (btw is 4 500gb sata 2 hard drives which i was trying to share with the other windows machines)
i did all u asked me to (haven’t rebooted yet) hopefully this will work. i have lots of debugging to do (i program in various languages for a living). so i will reboot after i am finished writing a fix in C++.

Regarding:
[data]
inherit acls = Yes
path = /srv
read only = No

In the scenario you describe, looks OK depending on the usage.
Ask if you have problems.

well i do need to be able to add add and remove users or be able to open the share to everyone who doesn’t have credentials

You can add or remove any users you like as Samba users, so long as you first make them exist as Linux users on the Suse box, then they can access the files. I’d make the share like this for that situation:

[data]
path = /srv
read only = No
force user = admin

And I’d make the files all belong to a user that I create called “admin”. “Force user” simply means that after a user logs on, that user assumes the persona & powers of “admin” for read-write operations.

If you want to avoid adding many users to the Linux user database and then to the Samba user database, you could make the share like this:

[data]
path = /srv
read only = No
guest ok = yes
force user = admin

In either case, the remote users are not aware of the “admin” user. They think they are still themselves. “Admin” is just a handy behind the scenes persona/device that keeps the filesystem and Linux ownerships tidy.