[SOLVED] SMB : Basic share

[SOLVED] SMB : Basic share

Postby pmithrandir » Jul 16th, '13, 22:13

hello,

I would like to know if anyone has a simple samba tutorial to share datas with other computer on my network.

The draksamba helped me to create a server(standalone) but then, no share are available even if I created one with public access.

I don't want security, just something that works.

Thanks,
Pierre
Last edited by isadora on Jul 20th, '13, 07:47, edited 2 times in total.
Reason: Cosmetical alteration in subject ;)
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: SMB : Basic share

Postby granger75 » Jul 16th, '13, 22:45

Hi,
sorry no tutorial, but
I'd check /etc/hosts.allow to grant access to the shares (something like ALL: 192.168.1.0/255.255.255.0)
and disable shorewall or check iptables-save to be sure the server is allowed to connect.
granger75
 
Posts: 4
Joined: Jul 6th, '13, 10:05

Re: SMB : Basic share

Postby pmithrandir » Jul 17th, '13, 08:18

Hi,
thank you,

I can now access smb://portable_pierre/ and see the download folder I shared.

But then, I get a message o KDE saying that the folder doesn't exist.
Maybe a problem on permission to access it ?
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: SMB : Basic share

Postby granger75 » Jul 18th, '13, 20:59

You're more than welcome!

Just guessing:
Maybe a problem with the local folder / mount point ?
Did you use MCC samba shares configuration module to setup the local folder?
Is the path correct?

Usually you get messages like "Only root can do that" for credential problems.
Have you tried to mount the share within the MCC samba shares configuration module?

OR it occurred to me that Dolphin could give this error if the samba share simply is NOT mounted (and you're not root....)
granger75
 
Posts: 4
Joined: Jul 6th, '13, 10:05

Re: SMB : Basic share

Postby pmithrandir » Jul 19th, '13, 08:24

Hello.

I did the set up with MCC to enable the share.

To connect on it, I'm using both windows or KDE direct network(no mount required).
I checked the permission and it seems ok... I'm going to try with a mount point linked to a folder without accent.

Pierre
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: SMB : Basic share

Postby magfan » Jul 19th, '13, 08:36

Once I had a similar problem. I had users with the same name and permissions on different system. But I could not access any smb share until I explicitly added those users as "samba users" in mcc. The samba server does not care about normal users - no matter whether they are the same on all systems in the network. It will take care only of registered samba users.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: SMB : Basic share

Postby pmithrandir » Jul 19th, '13, 09:26

Hi,

I'm never prompted for username and password from windows.
I also created the samba user nobody.
Anything else ?

Pierre
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: SMB : Basic share

Postby magfan » Jul 19th, '13, 11:11

Why did you add the user "nobody"?

OK, let's assume I am user magfan on several systems and user magfan has been added as samba user on the samba server. Let us further assume user magfan has the same password for all systems and as samba user. Then there are two possibilities:

1. User magfan can double click on "share" (see below) in Windows explorer or dolphin and use this directory from any system because magfan belongs to "valid users" and to the "write list".

2. In case magfan double clicks on any other samba shared directory where he has no access rights (not in "valid users") under Windows magfan should be prompted for a correct login - if there are any registered samba users on the samba server. Under KDE I do not know because for Linux-Linux shares I use NFS. Maybe you will simply don't get access to that directory.


Code: Select all
from /etc/samba/smb.conf

[share]
    path = /data2/share
    comment = share
    browseable = yes
    writable = yes
    create mask = 0664
    directory mask = 0775
    write list = magfan calvin hobbes bifurc headmod guest
    valid users = magfan calvin hobbes bifurc headmod guest
    hide dot files = yes
    preserve case = yes
Attachments
smb_share.png
share configuration in mcc
smb_share.png (67.18 KiB) Viewed 6425 times
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: SMB : Basic share

Postby pmithrandir » Jul 19th, '13, 13:22

I added user nobody because I want people to be able to connect on the shared folder from everywhere without password.
I use this folder from
- a computer
- my wii
- my smartphone

And for all of them, I don't need password as my internal network is secure enough for me.
That's the difficulty O tried to pass over, to build a non secured share folder accessible from the newtork without configuration from clients.

Not an easy one :)

Thank you
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: SMB : Basic share

Postby magfan » Jul 19th, '13, 14:18

OK, the following does the trick. You can set the option "security = share" either in the [global] section or for your specific directory. Also you should add for your shared directory "guest ok / guest only = yes", "guest account = nobody" and "public = yes". In my smb.conf it looks like this:

Code: Select all
[free_share]
    security = share
    public = yes
    guest ok = yes
    guest only = yes
    guest account = nobody
    path = /data/free_share
    comment = sharing for everybody
    browseable = yes
    writable = yes
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: SMB : Basic share

Postby pmithrandir » Jul 19th, '13, 16:24

thank you, I will try it this evening. If it works, I may go to the wiki to add the info for next time.

Pierre
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: SMB : Basic share

Postby pmithrandir » Jul 19th, '13, 19:21

Hi,

Here is my final config. The problem was on permission, but also on folder name that was téléchargements, which is not allowed it seems...

Code: Select all
[download]
    path = /home/pmithrandir/Telechargements
    comment = download
    browseable = yes
    public = yes
    writable = no
    security = share
    guest ok = yes
    guest only = yes
    guest account = nobody
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30

Re: [SOLVED] SMB : Basic share

Postby magfan » Jul 22nd, '13, 08:15

If you are using non standard (ASCII) letters in your shared directory name you could probably set under [global] "unix charset = ISO8859-1" and for mixed upper and lower case names "preserve case = Yes". It works very well with German umlaut (ä,ö,ü).
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: [SOLVED] SMB : Basic share

Postby pmithrandir » Jul 22nd, '13, 09:26

Hello,

I ùmay try that... but actually, I already renamed my folder, so no rush now :)

Thank you for all the help you provide.
I didn't update the wiki because finally, it doesn't seems to work with the CCM tool, so I didn't want to put in the wiki that the tool was unable to work...(who said not usefull anymore ?)
Creator of : http://www.jaiuneidee.net a "direct democracy" website for France.
User avatar
pmithrandir
 
Posts: 442
Joined: May 4th, '11, 19:30


Return to Networking

Who is online

Users browsing this forum: Google [Bot] and 1 guest