Samba trouble

Hello all.

I have just installed openSuse 12.1 with KDE on a Toshiba Satellite L 755. It all went very well and it runs beautifully, no dramas at all.
We also have an iMac 22" and a HP laptop with Win 7 as well in our place and i networked them all with Samba. That was pretty straightforward but the only problem i have is that
i can browse all the directories and files on the iMac, but cannot open any of them. That includes docs, pictures and sound. The HP can open and play all the files on the iMac so i don’t think it is a permission or sharing issue with the iMac. I can open/view/play all the files on the HP from openSuse so it seems that there is no problem from this end either.
Anyone got any idea?

Thanks

So I am using Samba with openSUSE 12.1 to older openSUSE versions and Windows 7, but no Mac’s to look at. I am not sure how to help, but you could post a copy of your /etc/samba/smb.conf file for us to see. Samba requires a properly configured configuration file (/etc/samba/smb.conf), it needs the nmb and smb services to be running (plus other required services in YaST / System / Runlevel), and it needs the Samba service to be opened in the Firewall, if you are running a firewall (this is recommended, allowed service include Samba Client, Samba Server & optional Netbios Server). Of course openSUSE 12.1 is real new using Samba version 3.6.1 and there could always be an issue with it we don’t yet know about. You can find tutorials on Samba here: openSUSE SuSE Linux HOWTOs and Tutorials by Swerdna. To get a copy of the configuration file open up terminal and issue a command: cat /etc/samba/smb.conf, then copy the text from terminal and paste it into a forum message using the advanced message editor and place within code tags #. Its helpful to know how you are configuring Samba (YaST, SWAT or manually).

Thank You,

Thanks James for your reply and the link to the excellent Samba tutorial.
I checked the firewall settings and it allows all the necessary services to go through.
Another thing i discovered is that the same thing happens with all the files in Win 7 under Bootcamp on the Mac, so it could be a iMac problem. I use OSX Lion, and Win 7 is configured exactly the same as on the laptop and i can read and write to that. Here is my samba config file .

Thanks very much.

Gerard

[global]
	workgroup = WORKGROUP
	passdb backend = tdbsam
	name resolve order = bcast host lmhost wins
	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
	add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
	domain logons = No
	domain master = No
	security = user
	wins support = No
	netbios name = linux-cyu8
	wins server = 
[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/
	username = gerard
	guest ok = Yes
[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

[netlogon]
	comment = Network Logon Service
	path = /var/lib/samba/netlogon
	write list = root

Gerard01 Thanks James for your reply and the link to the excellent Samba tutorial.
I checked the firewall settings and it allows all the necessary services to go through.
Another thing i discovered is that the same thing happens with all the files in Win 7 under Bootcamp on the Mac, so it could be a iMac problem. I use OSX Lion, and Win 7 is configured exactly the same as on the laptop and i can read and write to that. Here is my samba config file .

Thanks very much.

Gerard

The only one that jumped out to me was this line I am not sure about:

add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$

I thought I would post a copy of my global section just for comparison. I have had a few experts go through it here, but again, not connecting to any Mac’s.

[global]
    workgroup = WINDOWSNT
    netbios name = JAMES-PC
    server string = The Master of the Universe
    security = SHARE
    map to guest = Bad User
    name resolve order = wins bcast host lmhosts
    printcap name = cups
    preferred master = Yes
    local master = No
    domain master = No
    wins support = Yes
    usershare allow guests = Yes
    usershare max shares = 100
    hosts allow = 192.168.0.0/255.255.255.0, 127.0.0.1
    hosts deny = ALL
    cups options = raw
    name resolve order = bcast host lmhosts wins
    write raw = yes
    read raw = no

Thank You,

James, if you make your machine into a wins server (with the line wins support = yes), why then would you set wins as the least priority in the name resolution process (name resolve order)? To me it’s a contradiction. (I’m assuming that because you have" wins support = yes" in the wins server that you’ve set “wins server = IP address” in all the other machines?)

PS the two lines “preferred master = yes” and “local master = no” are flat out contradictions. Before a master can be the “preferred master” it must first be a “local master”.

How about this?

[global]
    workgroup = WINDOWSNT
    netbios name = MASTERLINUX
    server string = The Master of the Universe
    security = SHARE
    map to guest = Bad User
    name resolve order = bcast host lmhosts wins
    printcap name = cups
    preferred master = No
    local master = No
    domain master = No
    wins support = No
    usershare allow guests = Yes
    usershare max shares = 100
    hosts allow = 192.168.0.0/255.255.255.0, 127.0.0.1
    hosts deny = ALL
    cups options = raw
    write raw = yes
    read raw = no

So in my case all is working but I must be careful as my main computer is not yet running openSUSE 12.1 and I am not sure the exact linage of some of the configs I have used. None the less, I made the suggested changes. Now, what about the OP’s config, any suggestions there?

Thank You,

I love the server string best of all!

FWIW (since it’s working already) I suggest this is good:

local master = yes
preferred master = auto

Regarding Gerard’s problem: puzzled. I can’t see anything untoward. Simply because you can’t see what lurks behind unknown properties, I would comment out (with #) these lines, just to be sure:

include = /etc/samba/dhcp.conf

wins server =

add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$

but I bet that doesn’t help.

I feel the openSUSE machine is sending a username (maybe it’s “guest”, maybe it’s “gerard”) to the iBox that’s different from the username that the win7 box sends, and that makes a difference between read and write access. Or maybe the username and password on the win7 box do match exactly the Samba username and pwd on iBox, but not so for openSUSE, something like that, but since I have never seen an iBox, I am just running on intuition here, sorry.

I love the server string best of all!

FWIW (since it’s working already) I suggest this is good:
Code:

local master = yes preferred master = auto
Regarding Gerard’s problem: puzzled. I can’t see anything untoward. Simply because you can’t see what lurks behind unknown properties, I would comment out (with #) these lines, just to be sure:

include = /etc/samba/dhcp.conf

wins server =

add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$

but I bet that doesn’t help.

I feel the openSUSE machine is sending a username (maybe it’s “guest”, maybe it’s “gerard”) to the iBox that’s different from the username that the win7 box sends, and that makes a difference between read and write access. Or maybe the username and password on the win7 box do match exactly the Samba username and pwd on iBox, but not so for openSUSE, something like that, but since I have never seen an iBox, I am just running on intuition here, sorry.

As always swerdna you are pure genius when it comes to Samba. I have saved my modified smb file so I can hopefully find the right one next time I reload openSUSE.

Thank You,

Hi Guys

I want to get to the bottom of this, and to that end i downloaded and installed the latest version of Kubuntu and installed that on the Mac with Wubi in Win 7.
And what do you know, Samba works like a charm. I can open and read all the files on both Kubuntu and openSuse. So it is not a hardware issue either.
But i did what you suggested, swerdna, and now i can open and read/view all the files in Win 7 but not OSX yet. I may have to dig a little deeper in the various options in OSX.

Thanks a lot, James and swerdna for all your help and suggestions.

Gerard

Just an afterthought, check a few mechanisms, what do you get in answer to these commands:

  • su -c “rcnmb status; rcsmb status”
  • smbtree -N
  • zypper se systemd-sysvinit
  • cat /etc/sysconfig/SuSEfirewall2 | egrep “DEV_EXT=|FW_CONFIGURATIONS_EXT=”

Last one is hard, better use copy & Edit–>paste into console window.

Here are the outputs:

gerard@linux-cyu8:~> su -c "rcnmb status; rcsmb status"
Password: 
redirecting to systemctl
nmb.service - LSB: Samba NetBIOS naming service over IP
          Loaded: loaded (/etc/init.d/nmb)
          Active: active (running) since Wed, 23 Nov 2011 17:25:11 +1100; 8min ago
         Process: 1814 ExecStart=/etc/init.d/nmb start (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/nmb.service
                  └ 1857 /usr/sbin/nmbd -D -s /etc/samba/smb.conf
redirecting to systemctl
smb.service - LSB: Samba SMB/CIFS file and print server
          Loaded: loaded (/etc/init.d/smb)
          Active: active (running) since Wed, 23 Nov 2011 17:25:11 +1100; 8min ago
         Process: 1895 ExecStart=/etc/init.d/smb start (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/smb.service
                  ├ 1934 /usr/sbin/smbd -D -s /etc/samba/smb.conf
                  └ 1940 /usr/sbin/smbd -D -s /etc/samba/smb.confcat /etc/sysconfig/SuSEfirewall2 | egrep "DEV_EXT=|FW_CONFIGURATIONS_EXT="


gerard@linux-cyu8:~> cat /etc/sysconfig/SuSEfirewall2 | egrep "DEV_EXT=|FW_CONFIGURATIONS_EXT="
FW_DEV_EXT=""
FW_CONFIGURATIONS_EXT="netbios-server ntp samba-client samba-server xorg-x11-server"

gerard@linux-cyu8:~> smbtree -N
WORKGROUP
        \\LINUX-CYU8                    Samba 3.6.1-34.3.1-2691-SUSE-SL12.1-i386
                \\LINUX-CYU8\ab                 HP Photosmart c4500 Series, hpcups 3.11.10
                \\LINUX-CYU8\hpphotosmartc4500series    HP Photosmart c4500 Series hpijs, 3.11.10
                \\LINUX-CYU8\IPC$               IPC Service (Samba 3.6.1-34.3.1-2691-SUSE-SL12.1-i386)
                \\LINUX-CYU8
etlogon           Network Logon Service
                \\LINUX-CYU8\print$             Printer Drivers
                \\LINUX-CYU8\groups             All groups
                \\LINUX-CYU8\users              All users
                \\LINUX-CYU8\profiles           Network Profiles Service
        \\GERARD-PC      
 

gerard@linux-cyu8:~> sudo zypper se systemd-sysvinit
root's password:
Loading repository data...
Reading installed packages...

S | Name             | Summary             | Type   
--+------------------+---------------------+--------
i | systemd-sysvinit | System V init tools | package
gerard@linux-cyu8:~>

I hope it is of any help

Gerard

So, I thought I would only put on the screen what is different on my system:

1. I have an addition output per service:

Process: 1931** ExecReload**=/etc/init.d/nmb reload (code=exited, status=3/NOTIMPLEMENTED)
Process: 1973 **ExecReload**=/etc/init.d/smb reload (code=exited, status=0/SUCCESS)

2. One Output is different for the firewall:

**FW_DEV_EXT="eth0"**

3. I just show an additional Linux machine running Samba.

So, the second Output difference seems significant to me. If I do the following:

YaST / Security and Users / Firewall / Interfaces (on Left) / Firewall Interfaces (In Center-Right): I see my Network Interface, called eth0 & Assigned to the External Zone.

What does your Firewall Setting Say?

Thank You,

@Gerard01

I suggest you add the network interface to the “external zone” in yast, as James outlined (whatever, ethx, wlanx)

and also I have a problem with systemd-sysvinit in 12.1, as do quite a few others. It’s new. Buggy. It might be efficacious to try a swap to sysvinit-init. Have a look at the sticky at top of the Networking forum: Problem with Samba in openSUSE 12.1 re systemd

Try the first suggestion first, just in case it fixes the problem, then you wouldn’t have to mess with the second suggestion, which is a bit harder than the first.

Hi Guys

Just to let you know that the problem has been solved, well sort of.
I can now open, read, share and copy all my Mac files with the SSH File Transfer Protocol.
I did install the package “hfsutil” with yast so maybe that was part of the problem.

Thanks guys for all your help and advice.

Gerard