VectorLinux
July 23, 2014, 03:19:59 am *
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 10230 times)
subgeniusd
Member
*
Posts: 27


What's your voltage, Coppertop?


« Reply #30 on: March 05, 2009, 12:52:52 pm »

Hi nightflier - If you think I should start a separate thread I will. But since StrayBit and I share some very similar networking issues perhaps it's actually better to keep it here.

 
Quote
Additionally, the samba users need to be created and have passwords

I've never had to create specific samba users or set passwords before. Not on a home lan.


Currently I only have one OS installed on each computer. The Compaq is the Vector box. I duplicated the same smb.conf settings I used with the Zenwalk box. And I'm trying this Samba connection with one other computer - the new Vista box.


#=========== Global Settings====================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
   workgroup = ATLANTA

# server string is the equivalent of the NT Description field
   server string = Compaq

# Security mode. Defines in which mode Samba will operate. Possible
# values are share, user, server, domain and ads. Most people will want
# user level security. See the Samba-HOWTO-Collection for details.
   security = share

# this tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba.%m

# Put a capping on the size of the log files (in Kb).
   max log size = 50

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
   local master = no

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
   domain master = no

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
  preferred master = no

#======== Share Definitions =================

[SharedDocs]
   path = /home/danielh/SharedDocs
   comment = SharedDocs
   guest ok = yes
   public = yes
   writable = yes
   printable = no
   create mask = 0777
   directory mask = 0777


vector:/~
danielh:$ testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[SharedDocs]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
   workgroup = ATLANTA
   server string = Compaq
   security = SHARE
   log file = /var/log/samba.%m
   max log size = 50
   preferred master = No
   local master = No
   domain master = No

[SharedDocs]
   comment = SharedDocs
   path = /home/danielh/SharedDocs
   read only = No
   create mask = 0777
   directory mask = 0777
   guest ok = Yes




This is the result from vlsmbmnt:

vector://home/danielh
root:# vlsmbmnt
Mounting [\\ZENWALK\SharedDocs] at [/root/mnt/ZENWALK-SharedDocs]
mount error: could not find target server. TCP name ZENWALK/SharedDocs not found
No ip address specified and hostname not found
Mounting [\\BIGACER\SharedDocs] at [/root/mnt/BIGACER-SharedDocs]
mount error: could not find target server. TCP name BIGACER/SharedDocs not found
No ip address specified and hostname not found

(I don't understand why IP address needs to be specified and why hostname could not be found)


And this from your post recommendation:

vector:/~
danielh:$ ps aux | grep smbd
root      3234  0.0  0.1  10664  3032 ?        Ss   12:59   0:00 /usr/sbin/smbd -D
root      3238  0.0  0.0  10664  1196 ?        S    12:59   0:00 /usr/sbin/smbd -D
root      4579  0.0  0.1  11004  3124 ?        S    13:30   0:00 /usr/sbin/smbd -D
danielh   7060  0.0  0.0   2060   560 pts/0    R+   14:03   0:00 grep smbd



I know it's always confusing with this box can see those but that one can't see the other one etc.

Simply (and sadly) Vista/BIGACER can see and access everybody (including another computer with other installs I've recently tried). Zenwalk sees and accesses Vector just fine but Vector cannot see or access anybody else.

The Vector firewall is disabled and removed from startup services (I'm behind a Nat router with an SPI firewall).

I installed thunar-shares and the Vector SharedDocs folder is set to Properties-> Permission-> Group:sambashare-> Access:Read & Write.

I like VL with it's great community very much and really want to make this work. I've spent a lot of time trying to get this install networked and will try a little more.

Any suggestions?








Logged

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



« Reply #31 on: March 05, 2009, 03:30:56 pm »

Thanks for the two mask entries, I've added them to my shares.

If you are using Static IPs, you would need to put them in your /etc/hosts.  If the DHCP were also the nameserver (?), I would imagine that would take care of them.  Here is mine
Code:
# hosts Compaq VL6.0
# For loopbacking.
127.0.0.1 localhost
#
192.168.1.2 Human.Linux.net Human
192.168.1.3 Gateway.Linux.net Gateway
192.168.1.4 Compaq.Linux.net Compaq
192.168.1.5 FreeDos.Linux.net FreeDos
Human and Compaq are VL6, Gateway is Win98 and FreeDos is, er, well, FreeDos.  It has only minimal network at the moment until I get the network stabilized.

Also, I stand corrected.  Several posts backI said the user here is Bruce6.  That is true on Human which is set for triple boot.  Compaq is Bruce.

I started trying some of the commands you gave in an earlier post, specifically 'smbtree' - wow! I like it!  It showed all the samba shares on both Human and Compaq.  I've gotten used to this for Gateway
Quote
   \\GATEWAY              Win98
cli_rpc_pipe_open: cli_nt_create failed on pipe \srvsvc to machine GATEWAY.  Error was ERRSRV - ERRerror (Non-specific error code.)
      \\GATEWAY\IPC$              Remote Inter Process Communication
      \\GATEWAY\C     
It does show the printer on both VL machines??  The other two, I'll have to figure out what to add to them.  vlsmbmnt also shows the same shares but only a single printer correctly on Compaq.

Now to go to the others and see what they show.
Logged

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



« Reply #32 on: March 05, 2009, 03:50:36 pm »

Interesting!

Human vlsmbmnt also shows the Epson on itself.  I did verify that CUPS was not publishing it - might be the Load Printers in smb.conf.  Will comment that out and try later.  I double checked on Compaq and it is definitely NOT showing it on Human in vlsmbmnt

Win98 saw the file shares but NOT the printer!

Now to see if I can get the thunar-shares back off.  Hopefully that will restore my sound and Shutdaown/Restart buttons.  Whoa!  I just realized one of the shares I'm seeing on all machines is New Folder that was set with thunar-shares!  Well!  I'll just have to find another way to restore the missing items.  Any suggestions?
Logged

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



« Reply #33 on: March 05, 2009, 06:16:05 pm »

Hmm!  I tried opening these shares from the other two machines:  They all failed!  On Human, xterm was telling me "mount error 1 = Operation not permitted".  (Windows never asked - operating as Bruce.  Human asked for Samba User and password - I tried all three.)  I assume thats where that user setup in Samba comes in.  Is that smbpaswd?  And do they need to be the same as a user on the local machine?
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 #34 on: March 06, 2009, 03:42:56 am »

StrayBit-

Quote
Thanks for the two mask entries, I've added them to my shares.

Those are wide open permissions that I would only use in a sealed enviroment behind a good router firewall that I periodically check the logs of. Unlikely but Linux systems have been known to host viruses they are immune to. (like Typhoid Mary)

Quote
If you are using Static IPs, you would need to put them in your /etc/hosts

Well I'm on wired DSL/DHCP but the assigned LAN IP addresses are fixed as long as the unit is plugged to router. I've added them all to hosts allow before but it did not solve Samba access problems when they occurred.

Quote
Human asked for Samba User and password


Those should not be necessary unless specified in the smb.conf  file.
"# Use password server option only with security = server".
Just hit enter and continue through. When Samba is fully set up share access is direct and automatic like opening a folder in your home directory.

Quote
And do they need to be the same as a user on the local machine?


I've read in a number of Samba tips from forums etc that for simple file sharing you should always have the same user on all connected machines. Even if that means creating the same user name on all machines specifically for simple share access and file transfer.


I'm convinced Samba represents the merging of technology and Voodoo. I recall 5 or 6 months ago I had an XP, 2 Zenwalk 5.2 and some other distro on 4 machines networked on this same LAN.

Everybody could see and access everybody else except that the 2 ZW machines could not reach each other. Access denied blah blah. The first had been networking fine and I configured the second identically after installing with the same CD.

I eventually worked that out but don't recall if it was a configuration change or a chicken I sacrificed to the Samba fairies.  Grin


Logged

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



« Reply #35 on: March 06, 2009, 04:27:23 am »

I've usually seen some odd number like 756.  It was the entry that I needed - how it should be entered.

There is a difference in function between hosts and hosts.allow:  hosts is used to get the IP of a remote machine from a look-up, hosts.allow is checked to see if the remote machine is allowed access to this machine.  If it is not in hosts.allow then host.deny is checked to see if it should be denied access.  Here are mine
Code:
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided by
# the '/usr/sbin/tcpd' server.
#
# Version: @(#)/etc/hosts.allow 1.00 05/28/93
#
# Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org
#
#
ALL:192.168.1., 192.168.0., 127.0.0.
# End of hosts.allow.
and
Code:
#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# Version: @(#)/etc/hosts.deny 1.00 05/28/93
#
# Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org
#
#
ALL:ALL
# End of hosts.deny.
I used the first one when my network was all Win.  For a while, my local IPs were assigned by my router in the range of 192.168.1.100-150 and did work until the machines were started in a different order.

I noticed Samba didn't seem to care who the user was.  All three that I tried used the same password so I didn't know about that part.

I started out having the same users in the same order on each installation but crashed it when two versions shared the same /home.  Last Fall I was wanting to have a central home shared by all VLs but couldn't find out how to implement that.  (Disk space is a premium for me and not all boxes allow multiple drives.)

There are times that I think I should run out and get the fatted calf  Grin
Logged

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



« Reply #36 on: March 06, 2009, 05:33:00 am »

@ straybit - Manual IP: If dhcpcd is running, it will overwrite /etc/resolv.conf. That's why I said use vasm to remove all inet entries. If you know your ISP's dns servers, using those will work. Or you can use opendns: 208.67.222.222 and 208.67.220.220.

For troubleshooting purposes you should try the manual approach from the command line:
Code:
ifconfig eth0 down
killall dhcpcd
echo nameserver 208.67.222.222 > /etc/resolv.conf
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

If that doesn't work, something weird is going on.
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4018



« Reply #37 on: March 06, 2009, 05:50:59 am »

It is true you can set up samba to accept all users and passwords, similar to XP's approach. If you are fine with that, use these entries in smb.conf:
Code:
---
"security = share"
----
[SharedDocs]
   comment = SharedDocs
   path = /path/to/SharedDocs
   read only = No
   create mask = 0777
   directory mask = 0777
   guest ok = Yes
   public = yes
   writable = yes
   browseable = yes

It is not a bad idea to start with something like this and then add restrictions as needed.

I never messed with hosts.allow and hosts.deny. Improperly used, they will cut off access not just for samba, but all network apps. The hosts file can be used for some shortcuts to static ip's but it is not necessary for samba operation.
Logged
StrayBit
Vectorite
***
Posts: 373



« Reply #38 on: March 06, 2009, 09:00:42 am »

Tested thunar-shares on Human (the other VL6) - installation great, shared a folder in home/bruce - great and was able to copy a file with Win98 to it.  vlsmbmnt, however, acted like it did on Compaq when I was root, I had to ^C to get the prompt back.  I still have the restart and shutdown buttons (which I don't on Compaq) but, when logging in, ~/.dmrc can't be opened.  This is solved by resetting the permissions on bruce to not allow others to write, ie read-only.

Removing the check mark for sharing printers in CUPS/Admin solved the issue of the Epson being reported on Human.  (It's on Compaq.)

/home/public (a share in Samba) has read/write permissions to every one but windows couldn't open it - because the folder didn't exist  Huh  Created it and set read-write for every one - still no go.  Now where did that restart samba command go?  Found it 'service samba restart'  - Gateway still says it not accessible!

Found that /etc/rc.d/rc.rpc was not executable, set it and activated the services.  Compaq still reports some rpc error trying to mount Human and
Quote
Human://home
root:# mount /mnt/Cmpq
mount.nfs: internal error
No change in Gateway.
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!