Problems with samba server

Hi! I was following this guide about porting windows forms apps to linux using Mono: Guide: Porting Winforms Applications - Mono
But it uses an older version of OpenSuse (10.2) and the VMWare image that I have is Opensuse 11.1 and I can’t find the “Samba server” option in “Network Services”.

Click the “Computer” menu in the bottom left, choose Control Center.

Choose “YaST” at the bottom, the password is “mono”.

Choose “Network Services”, then “Samba Server”.

Check “Allow Users to Share Their Directories” on the “Shares” tab.

Choose “Finish”.

Can you tell me where I can find this option or another way to do whatever it does?

Thanks. :wink:

You can edit /etc/samba/smb.conf directly via your favorite editor. I prefer using a CLI edtitor like pico, but thats a matter of personal preference. As with many servers, they often run without graphical desktops, so manual configuration is necessary. (I had such a task assigned to me this week). If you have a graphical desktop, you might like to use

kdesu kwrite /etc/samba/smb.conf (KDE Desktop)

gnomesu gedit /etc/samba/smb.conf (Gnome Desktop)

Swerna’s excellent samba guide is a useful reference for configuring smb.conf as required.

I did what you told me and I get this:

[global]
	workgroup = MONO
	security = user
	passdb backend = smbpasswd
	username map = /etc/samba/smbusers

[homes]
	inherit acls = Yes
	browseable = No
	read only = No

[htdocs]
	inherit acls = Yes
	browseable = Yes
	path = /srv/www/htdocs/
	read only = No

In the guide it says I have to Allow Users to Share Their Directories. What do I have to change?

You need to add share entries . For example, a publicly shared directory

[shared]
path = /path/to/shared/directory
public = yes
only guest = yes
writable = yes
printable = no

Lots more share examples here.

If you explain how you want to set up access (with/without passord, which group(s), r/w access), then someone may be able to help create the exact entry required. I’m sure you’ll figure it out if you take the time to read the examples though. :slight_smile:

BTW: Don’t forget to restart the samba server if you make changes to smb.conf

Don’t fixate on the old “allow users to share directories…”. The wording leads ppl to think that’s a good way to share stuff over Samba. It’s not much good at all, just a beginning, and better set elsewhere.

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

[global]
       workgroup = MONO
       netbios name = name_of_this_workstation
       name resolve order = bcast host lmhosts wins
       server string = ""
       printing = cups
       printcap name = cups
       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

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

[htdocs]
	path = /srv/www/htdocs/
	read only = No
       force user = billybob

(force user should be considered for htdocs if you make your htdocs over to ownership of “billybob” with sudo chown -r billybob:users /srv/www/htdocs)

Sorry but I don’t use Linux usually and I don’t understand half of the things.

If you explain how you want to set up access (with/without passord, which group(s), r/w access), then someone may be able to help create the exact entry required.

This is what I need to do:

To transfer the application to the Mono image, we need to create a NClass directory and turn on directory sharing.

* Right click the desktop, choose Create Directory, name the directory NClass.
* Click the "Computer" menu in the bottom left, choose Control Center.
* Choose "YaST" at the bottom, the password is "mono".
* Choose "Network Services", then "Samba Server".
* Check "Allow Users to Share Their Directories" on the "Shares" tab.
* Choose "Finish".
* Back on the desktop, Right click the "NClass" folder you created and choose "Sharing Options".
* Check "Share this folder" and "Allow other people to write to this folder".
* Click "Modify Share". 

You can do all those steps – if you’re using Gnome Desktop. Are you?
If not using Gnome, there’s a different way to do it. And even if using Gnome, there’s an optional alternate way to do it.

Q1: What are you using, Gnome or KDE?

Q2: and is there (in your case) really a directory called NClass on the Desktop?

Q3: I’m wondering which Samba RPMs you have installed. Can you run this command and copy the results back here:

rpm -qa | grep samba

Q1: I’m using GNOME
Q2: The directorie on my desktop is called “GDH”
Q3:

samba-3.2.7-11.3.2
samba-client-3.2.7-11.3.2

AHA – I think we’ve found the problem. Go to Yast → soptware module and install the apps yast2-samba-server and yast2-samba-client. Then try again for the module “samba server” in Yast → network services. While you’re installing software, make sure the nautilus sharing tool is installed. The RPM is nautilus-share.

Ok now I get the samba server option. But

Back on the desktop, Right click the “GDH” folder you created and choose “Sharing Options”.

There’s no “Sharing options” option…

Do I have to touch anything else in the Samba server configuration

http://i29.tinypic.com/keuttc.png

:expressionless:

Here’s a sure fire (I hope) way of achieving it:
Put this stanza in the file smb.conf, located at /etc/samba/smb.conf. You can open the file with this command in a terminal, and then edit it:

gnomesu gedit /etc/samba/smb.conf

The stanza goes at the bottom:

[GDH]
path = /home/YourUserName/Desktop/GDH
read only = no
guest ok = yes

then run this command to make it accessible to guests:

sudo chmod 777  /home/YourUserName/Desktop/GDH

Check in the Yast RunLevel editor that smb and nmb are switched on.

That achieves this:

  • Click the “Computer” menu in the bottom left, choose Control Center.
  • Choose “YaST” at the bottom, the password is “mono”.
  • Choose “Network Services”, then “Samba Server”.
  • Check “Allow Users to Share Their Directories” on the “Shares” tab.
  • Choose “Finish”.
  • Back on the desktop, Right click the “NClass” folder you created and choose “Sharing Options”.
  • Check “Share this folder” and “Allow other people to write to this folder”.
  • Click “Modify Share”.

PS: Replace YourUserName with your username

I think it didn’t work! :’( I do this:

Now go back to Windows, and access your new share by typing “\mono
class” into the Run dialog. Copy your NClass project to the Mono image share.

But it says Windows cannot acces \mono\GDH

I think I did everything you told me.

Please post here the returns ypou get from these two commands:

testparm

cat /etc/samba/smb.conf | egrep “workg|WORKG”
They will show your setup more closely

1:

Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[htdocs]"
Processing section "[GDH]"
Loaded services file OK.
Server role: ROLE_DOMAIN_MEMBER
Press enter to see a dump of your service definitions

[global]
	workgroup = MONO
	security = DOMAIN
	username map = /etc/samba/smbusers
	add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
	domain master = No
	usershare allow guests = Yes
	usershare max shares = 100
	usershare owner only = No
	idmap uid = 10000-20000
	idmap gid = 10000-20000

[homes]
	read only = No
	inherit acls = Yes
	browseable = No

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

[GDH]
	path = /home/rupert/Desktop/GDH
	read only = No
	guest ok = Yes

2:

workgroup = MONO

You should edit the file smb.conf and put this stanza in the place of the current [global] stanza:

[global]
       workgroup = MONO
       netbios name = mono
       name resolve order = bcast host lmhosts wins
       server string = ""
       printing = cups
       printcap name = cups
       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

The rest of the smb.conf file is OK for now.

When finished, reboot Suse, pause, reboot windows, pause, reboot Suse, pause, reboot windows. That forces them to start talking.

When finished, reboot Suse, pause, reboot windows, pause, reboot Suse, pause, reboot windows. That forces them to start talking.

What does the pause mean?

Completely finish booting + 1/2 minute (fully established network communications).

Hey it worked!!! Yeah! Thank you very much. rotfl!

Well done. That Samba is one of the harder ones.