Samba foldersharing in Dolphin or Nautilus [Solved]

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

Samba foldersharing in Dolphin or Nautilus [Solved]

Postby maulbongo » Wed Oct 19, 2011 13:36

Hi there,

I'm using Sabayon since a few days an I'm totally impressed. I switched from LinuxMintDebianEdition and made the experience, that Samba is not this well implemented in Sabayon, so here I wrote a howto, so you all can use this nice foldersharing way. Here is also a link to the wiki article, I created:

http://wiki.sabayon.org/index.php?title=HOWTO:_Samba_foldersharing_in_Dolphin_or_Nautilus_the_smooth_way

1. make shure you have installed samba, kdenetwork-filesharing (for KDE SC) or nautilus-share (for Gnome)

2. open a terminal and become su

3. add a group called sambashare by running
Code: Select all
groupadd sambashare


4. add your user to the group sambashare
Code: Select all
gpasswd -a %username% sambashare
(where %username% has to be replaced with your username)

5. run these three commands:

Code: Select all
mkdir /var/lib/samba/usershares


Code: Select all
chgrp sambashare /var/lib/samba/usershares


Code: Select all
chmod 1770 /var/lib/samba/usershares


4. add these at the end of the [Global] section in smb.conf
Code: Select all
map to guest = bad user
usershare allow guests = yes
usershare path = /var/lib/samba/usershares
usershare max shares = 100
usershare owner only = false
username map = /etc/samba/smbusers


5. make sure all entries in
Code: Select all
/etc/samba/smbusers
are commented out

6. For sharing folders in you home folder, make sure that the homefolder of the user is readable to others, otherwise samba can't make the folders there accessable.

7. run
Code: Select all
rc-update add samba default
so the samba daemon is startet on systemstart (only if samba is not running at startup, for ubuntu or debian this should not be needed, but for Sabayon this is necessary).

8. And as some people will experience that after reboot the nmbd is not started and the shares are not shown you can add to the
Code: Select all
/etc/local.d/local.start
this
Code: Select all
/etc/init.d/samba restart
and if you still get problems using this you could try it with the sleep command to enshure that nmbd really can open a socket
Code: Select all
/bin/sleep 20 && /etc/init.d/samba restart
this lets the system wait for 20 seconds and then does the restart of the samba service.
You should find out what is the best time youself, for me the 20 seconds are good working.

9. And the
Code: Select all
/etc/hosts
should also be edited because the aliases are confusing smb.
So I changed it from
Code: Select all
# IPv4 and IPv6 localhost aliases
127.0.0.1   localhost sabayon %computername%
::1      localhost sabayon


to

Code: Select all
# IPv4 and IPv6 localhost aliases
127.0.0.1   localhost
::1      localhost


10. finally reboot, now you can use the foldersharing by rightclicking within Dolphin or Nautilus
Last edited by maulbongo on Thu Dec 08, 2011 18:03, edited 8 times in total.
greetings

maulbongo

Image
User avatar
maulbongo
Simple Hen
 
Posts: 58
Joined: Wed Oct 19, 2011 13:19

Re: Samba foldersharing in Dolphin or Nautilus [Solved]

Postby Fitzcarraldo » Wed Oct 19, 2011 14:28

Hello maulbongo, and welcome to the SL Forums. Nice to see you are posting some helpful information, but it would be better if you used the SL Wiki for these 'how to' threads and then just posted a link to your SL Wiki article in the SL Forums. That way your 'how to' articles will not get lost in the mists of time as new forum threads get added and your threads move down.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7340
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Samba foldersharing in Dolphin or Nautilus [Solved]

Postby maulbongo » Sun Oct 23, 2011 15:22

Hi there,

I found a problem, when doing all this stuff and I set a folder for sharing, I could connect to the host via smb but the folder was not shown.
so I tested arround with the /etc/hosts file and the command hostname -a gave me two aliases which were sabayon and my computername.
Then I edited the /etc/hosts from:

Code: Select all
# IPv4 and IPv6 localhost aliases
127.0.0.1   localhost sabayon %computername%
::1      localhost sabayon


to this:

Code: Select all
# IPv4 and IPv6 localhost aliases
127.0.0.1   localhost
::1      localhost


%computername% has to be changed to your computername without the two %

And after this all is working like a charme.

Can somebody please check this for confirmation, so I can edit the howto.
greetings

maulbongo

Image
User avatar
maulbongo
Simple Hen
 
Posts: 58
Joined: Wed Oct 19, 2011 13:19

Re: Samba foldersharing in Dolphin or Nautilus [Solved]

Postby maulbongo » Wed Oct 26, 2011 8:19

Awsome 59 Visits, but no answers.
I checked it myself with two other Installations ans can confirm, that this helped, so now I edit the howto.
greetings

maulbongo

Image
User avatar
maulbongo
Simple Hen
 
Posts: 58
Joined: Wed Oct 19, 2011 13:19

Re: Samba foldersharing in Dolphin or Nautilus [Solved]

Postby kage » Wed Nov 02, 2011 13:14

NICE

I also came from Mint and was have probs with samba / sharing
So I'll try your howto

Thnx a lot!
User avatar
kage
Simple Hen
 
Posts: 75
Joined: Tue Feb 06, 2007 23:53


Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 1 guest