networking 2 SL computers

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :)

Moderator: Moderators

Post Reply
bloodyscript
Simple Hen
Posts: 43
Joined: Tue Nov 11, 2008 22:23

networking 2 SL computers

Post by bloodyscript » Sun Mar 27, 2011 17:38

hi i have been trying to setup a network between two sabayon computers.

what i have done so far

configured the samba conf file
/etc/samba/smb.conf
i set security as
security = share

i enabled guest un commented the line
guest account = nobody

added these line to the top of the global settings
usershare allow guests = Yes
usershare max shares = 100
usershare owner only = False

i added my share
[public]
comment = stuff
path = /home/user/shared-folder
public = yes
browesable = yes
writable = yes
guest ok = yes
guest account = yes

restarted the samba service on both computers
/etc/init.d/samba restart

ive been trying to figure out whats wrong it shows the folder but states unable to mount location failed to mount Windows share when i try to access the folder.
i read some old threads on the forum along with unbuntu forum, opensuse forum, even followed the gentoo wiki on samba. when those all failed i tried googling the error i was getting but google just brought up shares via windows pc's. so then i tried sharing via nfs but ssh wants a user/pass. all i want to do is to enter my computers via a file manager like nautilus or thunar and be able to access the shares i designate security dosn't matter to me.

i forgot to add that i also chmod 777 to the shared folders

ssyspro
Baby Hen
Posts: 4
Joined: Wed Dec 17, 2008 5:51

Re: networking 2 SL computers

Post by ssyspro » Mon Mar 28, 2011 7:42

I have setup thunar share plugin on several machines and done manual configs on others and can access shares as desired from several gentoo, sabayon, and windows box's without issue. So below you will find a few things to check and a working config that may or may not help.

First make sure your host or computer names are different having the same name will cause sharing issues on any operating system you can check this by typing uname -n in a terminal window

Code: Select all

uname -n
If they are the same you will need to correct this first. Instructions can be found in the wiki.

http://wiki.sabayon.org/index.php?title ... e_hostname

Now assuming host or computer names are not the same and you say you use thunar as a file manager there is a share plugin I have had success with however it is not setup automatically.

The steps I took where to make sure samba, thunar, and thunar-shares was installed then I followed the instructions from the setup section of this site.

http://goodies.xfce.org/projects/thunar ... res-plugin

below is a copy from above website in case something was to happen to the page and the instructions prove useful.

Create a group (must be done as root)

Code: Select all

  export USERSHARES_DIR="/var/lib/samba/usershares"
  export USERSHARES_GROUP="sambashare"
  mkdir -p ${USERSHARES_DIR}
  groupadd ${USERSHARES_GROUP}
  chown root:${USERSHARES_GROUP} ${USERSHARES_DIR}
  chmod 01770 ${USERSHARES_DIR}
Use the following /etc/samba/smb.conf (or something similar)

Code: Select all

  [global]
  workgroup = WORKGROUP
  security = share
  usershare path = /var/lib/samba/usershares
  usershare max shares = 100
  usershare allow guests = yes
  usershare owner only = yes
Add the samba group to your user (replace your_username by your login)

Code: Select all

  usermod -a -G ${USERSHARES_GROUP} your_username
Restart Samba daemons

Code: Select all

  /etc/init.d/samba restart
Logout and login your user (your_username)

I have also not had any issues with a manual setup here is an example of a working smb.conf I removed all the junk from the file and wrote it exactly as shown below so of course your ip's and share paths will be different, I did want some security just to prevent unintentional changes to the shared files so shares 01 and 02 are read only and the admin is writable only from 2 ip's on the network and the share directory's are chown `ed as nobody:nogroup

Code: Select all

[global]
        workgroup = WORKGROUP
        server string = Storage
        security = SHARE
        log file = /var/log/samba/log.%m
        max log size = 50
        load printers = No
        dns proxy = No
        hosts allow = 10.20.33.0/24
        strict locking = No

[Share01]
        path = /storage/share01
        guest ok = Yes
        use sendfile = Yes

[Share02]
        path = /storage/share02
        guest ok = Yes
        use sendfile = Yes

[Shares_admin]
        path = /storage
        read only = No
        guest ok = Yes
        hosts allow = 10.20.33.2,10.20.33.52
        use sendfile = Yes

Assuming you don't have other problems with the corrupt files, network, router, or firewalls you should be sharing files and heading back here to mark this solved but if not you may want to post your full smb.conf and other details about your system like samba, kernel versions and how your trying to mount the share weather using mount from terminal, added directly to fstab, or using the network option in the file manager it would make it easier to identify if there is a simple configuration problem or other issue.

bloodyscript
Simple Hen
Posts: 43
Joined: Tue Nov 11, 2008 22:23

Re: networking 2 SL computers

Post by bloodyscript » Mon Mar 28, 2011 15:37

thank you very much for your extensive and detailed answer. i tried what you said but still i get the error "unable to mount location failed to mount windows share".

the process i go through
first i open the terminal and make sure samba service is started by typing /etc/init.d/samba restart
then i go into the network section of the file manager click on windows network-workgroup-the two computers im trying to network-than i see the folder shares i setup and click on them but the error msg appears. sometimes i also get the error no route to host. by default SL doesn't come with a firewall correct? i haven't installed one either. so a firewall shouldn't be interfering the computers are connected through my netgear router they are wired in.

my computers host names are indeed different
computer one=Aesir
computer two=sasquatcheian

kernel version is 2.6.38-sabayon-linux both computers
samba version is 3.5.8

my smb.conf file

Code: Select all

#======================= Global Settings =====================================
[global]
   usershare path = /var/lib/samba/usershares
   usershare allow guests = Yes
   usershare max shares = 100
   usershare owner only = False
   log file = /var/log/samba/log.%m
   max log size = 50
   load printers = No
   dns proxy = No
   workgroup = MYGROUP
   server string = Samba Server
   security = share
   guest only = yes
   guest account = nobody
   log file = /var/log/samba/log.%m
   max log size = 50
   interfaces = lo eth0
   bind interfaces only = true
   dns proxy = no
#============================ Share Definitions ==============================
wins support = no
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no

# Set public = yes to allow user 'guest account' to print
   guest ok = no
   writable = no
   printable = yes

[stuff]
   comment = stuff
   path = /home/hiawatha/Desktop/stuff
   public = yes
   writable = yes
   guest ok = yes 
   guest account = nobody
   browseable = yes
   available = yes

ssyspro
Baby Hen
Posts: 4
Joined: Wed Dec 17, 2008 5:51

Re: networking 2 SL computers

Post by ssyspro » Tue Mar 29, 2011 4:25

I am no expert on samba by any means but I loaded your smb.conf in a virtual machine and had the same results no connection ect. but the one error I did not get was host not found that sounds more like a network issue. I did get your config to work by removing the line in [stuff] share that says guest account = nobody and was able to browse the share folder but was unable to write anything so I chown nobody:nogroup the share and I could then write to the share also. Im not sure why removing that one line changed so much but you can give that a try and see if you get same results also seems to take samba a little while to reload so after your restart the service it may take 2-3 min.

bloodyscript
Simple Hen
Posts: 43
Joined: Tue Nov 11, 2008 22:23

Re: networking 2 SL computers

Post by bloodyscript » Tue Mar 29, 2011 22:05

thank you again. i believe your right its a network issue, so i searched on google how to switch from dchp to static ip hoping that may resolve the issue. i found i need to change a file "/etc/network/interfaces" but it seems the file dosn't exist or is in another location.

the command i used as root
nano /etc/network/interfaces

the screen was blank and said [new file] on the bottom of the screen.

i tried looking for the network setting in the xfce menu but all i found was about proxies and connection preferences for proxies and the like.

ssyspro
Baby Hen
Posts: 4
Joined: Wed Dec 17, 2008 5:51

Re: networking 2 SL computers

Post by ssyspro » Wed Mar 30, 2011 1:23

Think the file your looking for is /etc/conf.d/network

BUT

For Static IP Help Start with a search on this forum.

http://forum.sabayon.org/search.php?keywords=static+ip

And on the Sabayon wiki

http://wiki.sabayon.org/index.php?searc ... c+ip&go=Go

Lots of help and examples there..

Post Reply