VectorLinux
September 19, 2014, 03:39:39 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: 1 [2] 3
  Print  
Author Topic: Linux-to-Windows file sharing  (Read 10657 times)
StrayBit
Vectorite
***
Posts: 373



« Reply #15 on: March 03, 2009, 02:44:28 pm »

I saved the file to my home folder and expanded it there.  When I went to move it to /sbin is when I discovered it was already there.  His comment on bind had scared me off from using one of the machines to be my router - especially when I found that I had a Linksys router.  In other words, I have no idea what to do about bind.

I had no problem installing thunar-share.  When I right-click -> properties, the tab is along the top just past permissions.  The user must be the owner of the folder and Samba must be running for it to work.  So far, Samba is NOT starting on re-boot so I have to start it manually.  With all of that I had another problem when I tried to share the folder.
Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
caitlyn
Packager
Vectorian
****
Posts: 2875


WWW
« Reply #16 on: March 03, 2009, 02:46:21 pm »

samba is not set to start by default in VL6.  You should be able to go into vasmCC -> Servcies and choose the appropriate runlevel and check off samba.  Then it should start at each boot.
Logged

eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1
StrayBit
Vectorite
***
Posts: 373



« Reply #17 on: March 03, 2009, 03:10:38 pm »

It was already marked in both run-level 2 and 4.

vlsmbmnt does mount the shares offered but thunar-shares says that it isn't running!

PS: Sorry for my comment on another post.  I felt it was wrong to say that it was a bug. And from my own experiance, even that comment has triggered me to look again.)
Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
StrayBit
Vectorite
***
Posts: 373



« Reply #18 on: March 04, 2009, 08:52:12 am »

For the past few days, when I right-click on a directory -> properties -> share the Folder Sharing is grayed-out and in red bottom it says "You may need to install Samba. check your user permissions (usershares group) and re-login.  More info: http://thunar-shares.googlecode.com/"

Followed that link and, among other things found
Quote
Setup Samba

If your are using (X)ubuntu 8.04 or above just check your User privileges after install the plugin. Also install samba and libpam-smbpass.

For non (X)ubuntu users the Samba setup is:
Create a group (must be done as root)

  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)

  [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)

  usermod -a -G ${USERSHARES_GROUP} your_username

Restart Samba daemons

  /etc/init.d/samba restart

Logout and login your user (your_username)
I was surprised that I had NOT modified smb.conf but I didn't have any windows folders on this machine.  &USERSHARES_DIR already existed. /etc/init.d/samba restart reported no such file or directory so I rebooted the system.

Surprised me that the Restart and Shutdown buttons were grayed out probably as I had the windows machine mounted in my home directory as I also saw difficulty unmounting /home.  After restart, I was able to set the share property.  The file that I created was owned by pcguest!  Possibly as windows is bruce where in VL the user is bruce6.

Also, I have now figured out that '/etc/init.d/samba restart' is '/etc/rc.d/rc.samba restart' in our system.

Checking from my Windows machine, I was able to access this folder, create and save a text document.  Now to figure out how to do the same from the other VL machine as well as keeping this one from using DHCP.
Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
M0E-lnx
Administrator
Vectorian
*****
Posts: 3180



« Reply #19 on: March 04, 2009, 10:06:55 am »

A couple of things... your smb.conf gets patched by my package and the USERSHARES_DIR also gets created... this was an effort to automate the process...
However,  the way the service is started is different and I wasnt sure if I should have enabled the samba service by default or not.
but you can start the samba server by simply issuing the command "service samba start" at a terminal as root.

The samba start script is actually located in /etc/rc.d/init.d/samba
Logged

StrayBit
Vectorite
***
Posts: 373



« Reply #20 on: March 04, 2009, 11:07:55 am »

I did have to add the 4 usershare entries in smb.conf.  And I've verified twice now that Samba is enabled in the start up service sets - and found that vlsmbmnt was working.  I'm hoping that having 2 inets sharing eth0 was the reason it was going to the DHCP for an address.  I have to re-boot again to test that.  It is working now from this machine 0 at least I have access to New Folder from Windows.

I now have 3, maybe 4, methods of sharing from Linux:  Samba, exports, and thunar-shares.  Exports isn't working yet - the other machine keeps giving a nfs error.  I'll try from it some more later this afternoon.
Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
subgeniusd
Member
*
Posts: 27


What's your voltage, Coppertop?


« Reply #21 on: March 04, 2009, 11:11:58 am »

Hi Vectorites -

I searched the VL and Slack repos for fusesmb but no luck.

I have 2 Zenwalk 5.2 boxes networked with a new Vista (yuck) machine using fusesmb. Not as effortless as advertised, still ended up needing to manually edit /etc/samba/smb.conf including directory mask. But at least it works and keeps working.

I really like VL 6.0 but find it strange that here we are in 2009 still struggling with network sharing. Why is that?

Having the ability to directly share files with Windows users is nice way of introducing them to Linux. Alternatively not being able to connect at all is quite unhelpful. I know from experience it can be a deal breaker.

Adding fusesmb to the repos would eliminate most if not all of these networking issues.

Other then that 6.0 is a very impressive release. Thank you. Smiley
Logged

Net neutrality - now and forever!
StrayBit
Vectorite
***
Posts: 373



« Reply #22 on: March 04, 2009, 12:39:13 pm »

Yeah!  I've been wondering about that!

Well, it seems I've introduced new problems:  Exit ONLY allows me to log=out, not sutdown or restart!  Also, I have lost sound, even the volume control shows an empty box!  And it's still going to DHCP for address rather than using the static address that inet0 is set for in vasm.

I just installed thunar-shares on the other machine - it replaced my smb.conf!  Fortunately, I had a backup of it so I could replace my shares.

This is getting ridiculous!  I'm about ready to give up on Linux and revert back to Win95 and DOS!  Of course I'll lose most of my internet abilities.  As it stands, the ONLY way I can open a file on one Linux machine is to copy it to Win98 and open it from there on the other machine!  With every thing I've tried, I haven't had a chance to check out some the neat sounding programs available in Linux.

Don't get me wrong!  VL is a good system and if I wasn't jumping from one problem to two others all the time, I would love to learn how to use it and start getting some work out of it.  And the problems are probably my own doing as I have to make do with  computers from the past millennium since I can't afford to purchase the latest and greatest machine  to put on the current version of that other sw that is getting more and more crippled and I can't afford either.
Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #23 on: March 04, 2009, 01:16:04 pm »

Initially, samba gave me a lot of grief. I tried one GUI app after the other but could not consistently make it work. Once I bit the bullet and learned how to do it using command line it became easy and consistent. That's samba itself, firewalls introduce possible complications but that's a separate issue.

If you would like to try it that way, I'll be happy to offer suggestions.
Logged
subgeniusd
Member
*
Posts: 27


What's your voltage, Coppertop?


« Reply #24 on: March 04, 2009, 09:28:08 pm »

Quote
Once I bit the bullet and learned how to do it using command line it became easy and consistent.

I use "smbtree" "nmblookup" smbclient" for network scans and hand edit all the config files so I'm not entirely dependant on a samba gui.

I'm just looking for a handy share browser which is what fusesmb facilitates. Then you just open the folder you made (I just name it Samba) and there's your Workgroup. A rather inelegant solution but it works and that's all that matters.

PCLOS 2007 had a "network places" shortcut on the panel that took you right to your Workgroup after you set it up.(probably a modified Smb4k app).

Quote
If you would like to try it that way, I'll be happy to offer suggestions.
This is a concise Samba how-to for Slackware that covers most of what a home/SOHO networker needs to know and should apply to VL as well.
http://www.linux.com/articles/58593

nightflier - Have you any suggestions for finding or making a convenient network share browser? The only reason I was looking for fusesmb is because it came with Zenwalk so I expected to see it in the Vector repos.
« Last Edit: March 04, 2009, 09:29:39 pm by subgeniusd » Logged

Net neutrality - now and forever!
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #25 on: March 05, 2009, 05:31:26 am »

IMO, vlsmbmnt is the easiest and lightest GUI samba browser/mounter.
Logged
StrayBit
Vectorite
***
Posts: 373



« Reply #26 on: March 05, 2009, 07:08:55 am »

Whew!  For a while there I thought I had let loose a diatribe last night.  Re-reading it, it sounded pretty tame compared to what I went through afterwards.

Using cli is an option Nightflier, and thank you Subgeniousd for mentioning some of them.  Never knowing what command to issue, and what options to use with it, has been a pain as I could find no brief summary of what to try for what I wanted to do.  So I was left to the gui commands and they didn't always do what I wanted.  For example, I had to use SWAT just to see if Samba was running.  Until this last installation, however, I had to shutdown Seamonkey before I could start it.  Now SWAT and CUPS default to FireFox.  And I've finally found that if I'm root, SWAT allows me to start and stop the daemons and make changes to smb.conf.  I have to be careful of the latter, though, as it will wipe out the comments and maybe other parts in the file.  Usually, I hand edit it.

I'm to the point on this machine that I'm thinking of wiping the disk and reinstalling (I still have a CD drive temporarily hooked to this machine).  I've lost sound (as I said, even the Volume Control is an empty box!). That hurts as the only other machine with sound is Win98 and its getting flaky even with streaming radio.  Short of using the Power Button, I now have to log-out then use shutdown/restart from the login screen.  And I can't get the IP address to stick. VL6.0 is getting its IP from DHCP instead of using the STATIC address.  I have to manually set it through VASM each time I restart.
Quote
root:# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:8b:c6:a2:9c 
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17656 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18669 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10363150 (9.8 MiB)  TX bytes:3587129 (3.4 MiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:41 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4044 (3.9 KiB)  TX bytes:4044 (3.9 KiB)

Compaq://home/bruce
root:# vasm
$DCMD --backtitle "$BACKTITLE" --title "$TITLE" --menu "$TEXT" $DIMENSION \
inet0 "DEVICE=eth0, IPADDR=192.168.1.4" \
inetd "DEVICE=, IPADDR=" \
2> $freply
Starting network eth0 as 192.168.1.4/255.255.255.0...
Setting up gateway 192.168.1.1 ...
Compaq://home/bruce
root:# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:8b:c6:a2:9c 
          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17915 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18685 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10379531 (9.8 MiB)  TX bytes:3590143 (3.4 MiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:41 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4044 (3.9 KiB)  TX bytes:4044 (3.9 KiB)
I may have had to do this once on previous installations.  On this one, every time! Have no idea what else may be affected - probably are some.

I have heard about fuse several times but not knowing what it was, I've stayed away from it.  I see that there is no man page for it.  Google found the SourceForge page but that doesn't tell me much - if I wanted Hello World, I'd use C!

I had great plans for my system six months ago but was warned away from using VL as my router.  Fortunately, I found that I had a router that would handle Broadband access - I just have to reset it up to half a dozen times a day!  So far, I haven't had any luck having a distributed central data storage (both of my 20 GB disks are full though if I had time to sort through them, I think I could free up some space).  I finally got a printer and got it installed on one machine but still can't share it.  And forget programming, at least till next winter.

Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #27 on: March 05, 2009, 08:56:14 am »

Samba can be quite confusing. In review, there are two components; server and client.

When you are viewing remote samba shares, you are using a client of some sort (vlsbmnt, fusesmb, pyneighborhood, konqueror etc.). This client sends out a request on the network which discovers the remote shares. When you connect to those, the client provides the username and password to the server. You do not need "samba" (the server) running on your local machine to make this happen.

The samba server offers shares on the local machine for others to use. To create magic, you need a directory with permissions set to allow access by the samba users. Then you need your smb.conf configured to point to that dir, as well as specifying permissions (note that you will be dealing with two sets of permissions). Additionally, the samba users need to be created and have passwords set. These user accounts are in addition to the system user accounts (so again, two sets). Finally, the samba server needs to be started.

All of this can be done with the command line, but on the client side it becomes a chore. In this case I really like KDE's Konqueror. It seamlessly traverses samba shares and does the work for you. I tried the KDE 3.5 packages in VL6 repo, but that functionality is not yet added. May need to wait until SOHO gets underway.

For the server, it is something you don't touch very often. Once configured, it is out of sight, out of mind, so I personally only use manual edits of smb.conf. SWAT confuses me Wink To see if the server is running, issue command "ps aux | grep smbd" in a terminal. Look for something like:
Code:
root      2125  0.0  0.2  12352  2552 ?        Ss   00:26   0:00 /usr/sbin/smbd -D
root      2153  0.0  0.0  12352   880 ?        S    00:26   0:00 /usr/sbin/smbd -D
1000      2627  0.0  0.2  12372  2656 ?        S    08:10   0:00 /usr/sbin/smbd -D
1000      2628  0.0  0.2  12372  2652 ?        S    08:10   0:00 /usr/sbin/smbd -D
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #28 on: March 05, 2009, 09:10:01 am »

I also prefer to use static IP addresses. One less daemon (dhcpcd) running in the background. Normally, using VASM once takes care of it, but when that doesn't work, here is an alternative approach:

Assumptions: Your internet gateway and nameserver is 192.168.1.1 (typical for DSL and cable modems). You want your box to use eth0, address 192.168.1.100. Modify as needed.

- First, use vasm to delete all inets.
- Make sure your /etc/resolv.conf file contains a line like this:
Code:
nameserver 192.168.1.1
- Add the following lines to /etc/rc.d/rc.local:
Code:
ifconfig eth0 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.254 up
route add default gw 192.168.1.1

Logged
StrayBit
Vectorite
***
Posts: 373



« Reply #29 on: March 05, 2009, 11:35:36 am »

resolv.conf keeps reverting to this
Code:
# Generated by dhcpcd for interface eth0
search ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
nameserver 64.13.40.5
nameserver 64.13.115.12
after adding the line you mentioned which I have occasionally used
Code:
# Generated by dhcpcd for interface eth0
search Linux.net
nameserver 192.168.1.1
nameserver 64.13.40.5
nameserver 64.13.115.12
I have my doubts about its effectivness, however, the only time it has an entry is after some machine gets an IP from it and then it only lists the IP and mac address, the name is blank unless it was a win machine making the request.  (That is a Linksys Wireless Access Point BEFW1154 Cable/DSL router)  Its DHCP assigns address 100-150.  This machine is 4.

For once, the login screen wouldn't let me restart, it was frozen for a long time.  I had to work the power button.  Once I got back, this note file and rc.local had the changes but not resolv.conf.  Trying again...  This time it stuck.  But
Code:
bruce:$ /sbin/ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:50:8b:c6:a2:9c 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:17 errors:0 dropped:0 overruns:0 frame:0
          TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1321 (1.2 KiB)  TX bytes:10836 (10.5 KiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:300 (300.0 B)  TX bytes:300 (300.0 B)
I still had to start it from vasm.
Logged

Dell GX280: [7.0-Gold-Final], 6.0-Gold-Final, 5.9-Gold
HP 670 Win7 & VL7.0
Pages: 1 [2] 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!