Author Topic: Local Network HELP!!!  (Read 5201 times)

Offline shadowcatt

  • Jr. Member
  • **
  • Posts: 44
Re: Local Network HELP!!!
« Reply #30 on: October 17, 2009, 12:59:01 AM »
muun,

thanks for the help tonight. I have been on this site for 10.5 hrs today and need to get some rest. I will check tomorrow for any more posts

Thanks again
aldy

Online muungwana

  • Hero Member
  • *****
  • Posts: 6252
Re: Local Network HELP!!!
« Reply #31 on: October 17, 2009, 01:05:24 AM »

you have two computers, computer A has folders you want to access from computer B. For this purpose, computer A is a server and B is a client.

from what you have said, you can see shared folder of computer A from computer B but you can not write to the share, correct? ..

that could be caused by permissions issues. I am currently working with an assumption that the mount points on computer B has permissions problems ..what are the folder permissions of computer B mount point? are they in /mnt or?
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

oshunluvr

  • Guest
Re: Local Network HELP!!!
« Reply #32 on: October 17, 2009, 07:27:53 AM »
Wow a lot of posting here since I first read this post - I'm glad muungwana is helping you with samba, but (just to throw a wrench into it  ;) )  you don't need samba at all if you're not using windows on one of the computers. Printer sharing is done with cups and file sharing with NFS is better IMO for several reasons.

However - I will let you work this out with samba since you're started into it.

The problem you were having with NFS was likely a permission issue which there are several ways to solve:

1.You can ensure all users have the same user and group ID's on all your computers (easy)
2.You can set your NFS mounts to assign the same user and group ID's to everyone who accesses the files (not too hard but a little unsafe)
3.You can force group assignment via the sticky bit to all shared directories and create a special group for file sharing (harder but safer than #2).

Let me know if you decide to go back to NFS and I'll help you.

If you want to know how

oshunluvr

  • Guest
Re: Local Network HELP!!!
« Reply #33 on: October 17, 2009, 09:32:36 AM »
I assume you have nfs-utils, nfs-clients, and portmap installed on all computers.

Printer Sharing:
On each computer in a web browser (konqueror or firefox) type localhost:631 and click on the Administration tab. Select Show printers shared by other systems on ALL the computers and Share published printers connected to this system only on computers with printers attached to them.

Get the computers to “See” each other:
I am assuming all computers are connected via a router or switch so they all have direct access to each other. The actual type of connection (wired or wireless) is of little consequence. Also, it's a lot easier if all connections are the same net/subnet. The common default net address is 192.168.1.XXX and subnet 255.255.255.0. Verify this by typing ifconfig in a terminal on each computer and looking at the IP address and mask.

Next, these files need to be edited: /etc/hosts.allow, /etc/hosts.deny. Add these lines to the respective files:

/etc/hosts.allow
Code: [Select]

portmap: 192.168.1.
lockd: 192.168.1.
rquotad: 192.168.1.
mountd: 192.168.1.
statd: 192.168.1.

/etc/hosts.deny
Code: [Select]

portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL
This allows only your computers into your filesystem

Hostnames:
I think it is less confusing if you use meaningful and correctly defined hostnames for each computer. This information is stored in /etc/hosts. In PCLinuxOS this can be edited via PCLinuxOS Control Center ( aka PCC ). Select Network & Internet, then Host definitions. I use hostnames relating to where the computer is or some other sensible scheme like the owners name or whatever. The first line should already be in there and will have the IP address 127.0.0.1 and the alias localhost. Modify this line and add the full host name and other alias to this line. For example: your networked computers are named father, mother, brother, and sister and you're the Jones family. Set the hostname of Father's computer as father.jones.net and the aliases as localhost and father. Separate the aliases with a space. Then add each of the others hostnames (in separate entries) using their names in the same fashion and for IP, if you're using static addresses enter the exact IP or if your using DHCP (most likely) use 192.168.1.0.. When complete your /etc/hosts file should look like:

# generated by drakhosts
127.0.0.1 father.jones.net father localhost
192.168.1.0 mother.jones.net mother
192.168.1.0 brother.jones.net  brother
192.168.1.0 sister.jones.net  sister

Do this on each computer and restart network services (or reboot) and they should now all “see” each other. You can test this by pinging each computer in a console. For example, in a terminal type ping mother and it should return the IP address and full hostname of the computer named mother.

File Sharing > next post

Offline shadowcatt

  • Jr. Member
  • **
  • Posts: 44
Re: Local Network HELP!!!
« Reply #34 on: October 17, 2009, 10:35:20 AM »
okay, couple of questions
1. Do I add all 4 hostnames to each computer or just the one sharing the printer or just 1 hostname on each pc
2. My network is using 192.168.2.x, do I change the text in /etc/hosts.allow to 192.168.2. (why is the last number left blank)

Also, I can't use 192.168.2.0 for all other entries in Hostnames. It says ip already used (does that mean DHCP is not being used)

Yours
# generated by drakhosts
127.0.0.1 father.jones.net father localhost
192.168.1.0 mother.jones.net mother
192.168.1.0 brother.jones.net  brother
192.168.1.0 sister.jones.net  sister

mine
# generated by drakhosts
127.0.0.1 ****.*******.net localhost dave
192.168.2.4 ****.*******.net localhost brett
192.168.2.5 ****.*******.net localhost sam
192.168.2.3 ****.*******.net localhost heidi

*=I hid the names

thanks
aldy
« Last Edit: October 17, 2009, 10:59:45 AM by shadowcatt »

oshunluvr

  • Guest
Re: Local Network HELP!!!
« Reply #35 on: October 17, 2009, 01:29:44 PM »
Quote
okay, couple of questions
1. Do I add all 4 hostnames to each computer or just the one sharing the printer or just 1 hostname on each pc
If you want full peer-to-peer (which means sharing files form any computer to any computer) having all hosts defined on every computer will be needed. If you're setting one computer as the file sharing server, then you need only define all of them on the server and define the server on each client. You can still pass files back and forth across the server - you will just need to copy it TO and them FROM the server. Basically, every computer will be both a host (server) and a client.

Quote
2. My network is using 192.168.2.x, do I change the text in /etc/hosts.allow to 192.168.2. (why is the last number left blank)
Yes, and the last digit missing should allow all clients in that netmask to access the other hosts. If you using static IP's you can define them specifically. If you using DHCP each cleint may have a different IP each time it logs into the network.

Quote
Also, I can't use 192.168.2.0 for all other entries in Hostnames. It says ip already used (does that mean DHCP is not being used)
Sorry, I didn't try it first. The tool also won't allow you to leave the last digit off. It seems PCC will only work for fixed IP's. Edit the file manually and either remove the last digit or replace it with a zero. I'll do some more research on my end and report back.

oshunluvr

  • Guest
Re: Local Network HELP!!!
« Reply #36 on: October 17, 2009, 01:56:42 PM »
I did some more reading and it seems my hosts ideas are a holdover for something else. The /etc/hosts file defines STATIC hosts only so if you're on dhcp (dynamic IPs) you need to add the hostnames of each client to /etc/hosts.allow so it would look like this:

[admin@server ~]$ cat /etc/hosts.allow                                       
Code: [Select]
#                                                                             
# 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.                               
#                                                                             
portmap: 192.168.1.                                                           
lockd: 192.168.1.                                                             
rquotad: 192.168.1.                                                           
mountd: 192.168.1.                                                           
statd: 192.168.1.                                                             

dave.****.net
dave

brett.****.net
brett

sam.****.net
sam

heidi.****.net
heidi
Alos - localhost should be in the definition only for the "local" computer. Meaning "dave" has localhost as an alias only on Dave's computer and so on. So Dave's /etc/hosts looks like:

Code: [Select]
# generated by drakhosts
127.0.0.1 ****.*******.net localhost dave
192.168.2.4 ****.*******.net brett
192.168.2.5 ****.*******.net sam
192.168.2.3 ****.*******.net heidi

So next question: How do want file sharing set up?????

Do you want a server directory that everyone accesses and has full control or some control or public directories on each computer that everyone can access or????

This is linux so there is 1000 options.

My way: I have a group called "shared". All my users are included in the "shared" group. I keep my shared directories on my dedicated server and mount them on each client. I set the directory GID (group ID) Sticky Bit to "on" which means each file transaction sets the group to the target group - in this case "shared" and the default group permissions are "full" i.e. "rwx". This results in a system where in everyone who has access (and is a "shared" group member) can edit, view and delete all files in "/shared" but all files on the clients are not accessible form another client.

For peer-to-peer I think it's better to have a "Public" directory on each users home on every computer and set it to group "users" like above. Then each client can access only that directory and you can set permissions to allow view but not delete or whatever you want.

Offline shadowcatt

  • Jr. Member
  • **
  • Posts: 44
Re: Local Network HELP!!!
« Reply #37 on: October 17, 2009, 04:28:50 PM »
oshun,

lets do the server client option, that probably help me learn more than p2p. don't you think?

oshunluvr

  • Guest
Re: Local Network HELP!!!
« Reply #38 on: October 17, 2009, 09:02:20 PM »
Ok - lets make a dedicated directory on your "server" computer. Use a computer that's on most or all the time.
In a terminal or konsole on that computer (or via ssh if you know how), set the access with these commands (you can cut and paste)
Code: [Select]

mkdir -m 2774 /shared
chown nobody:users /shared
echo /shared 192.168.2.0/255.255.255.0(no_root_squash,async,secure,no_subtree_check,rw) > /etc/exports
exportfs -a
This allows everyone in the group "users" to read,write,execute (and delete) all files within the /shared directory and will change the group to "users" for all files and directories created within /shared. The last two commands open the directory to the network and to your clients.

In theory - if we've done everything correctly, you should be able to open up PCC on your client computers and locter the NFS server and mount the /shared directory. Let me know what you run into.



Offline shadowcatt

  • Jr. Member
  • **
  • Posts: 44
Re: Local Network HELP!!!
« Reply #39 on: October 17, 2009, 09:26:43 PM »
here it is!

[root@localhost ~]# mkdir -m 2774 /shared
[root@localhost ~]# chown nobody:users /shared
[root@localhost ~]# echo /shared 192.168.2.0/255.255.255.0(no_root_squash,async,secure,no_subtree_check,rw) > /etc/exports
-bash: syntax error near unexpected token `('
[root@localhost ~]#


Got this fixed!!!! Thanks to muungwana!
« Last Edit: October 17, 2009, 10:13:28 PM by shadowcatt »

oshunluvr

  • Guest
Re: Local Network HELP!!!
« Reply #40 on: October 17, 2009, 10:57:42 PM »
You have to edit the /etc/exports file manually and add the line
Code: [Select]
/shared 192.168.2.0/255.255.255.0(no_root_squash,async,secure,no_subtree_check,rw)

Offline shadowcatt

  • Jr. Member
  • **
  • Posts: 44
Re: Local Network HELP!!!
« Reply #41 on: October 17, 2009, 11:15:19 PM »
welcome back oshun!

Went to a client box, PCC==>NFS shares, doesn't find /shared.
do I need to edit the clients still with:
/etc/hosts.allow
Code:


portmap: 192.168.2.
lockd: 192.168.2.
rquotad: 192.168.2.
mountd: 192.168.2.
statd: 192.168.2.


/etc/hosts.deny
Code:


portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

sorry, got confused with this (think this was just for the printer but i did not add this and 2 box's can seen the printer..have only checked 2 so far)

Also, what should the hostnames on the other box's look like?
127.0.0.1 brett.*******.net localhost brett   (diff name on each box)
and do i add a hostname 192.168.2.2 for the server on each client


« Last Edit: October 18, 2009, 12:32:52 AM by shadowcatt »

robert_300

  • Guest
Re: Local Network HELP!!!
« Reply #42 on: May 24, 2010, 06:34:33 AM »
I have had this problem and tried all the suggestions here.  My samba shares worked fine (PCLOS machine as samba host, eeePC Xandros and Macintosh as clients) under PCLOS2009/KDE3, but PCLOS/KDE4 no go.  The eee could see the share directory on the host, but the file manager (konqueror) crashed every time I tried to open the share directory, either as root or user.

I've searched through the wiki, the forum and Google.  What I found was a suggestion to force users to server_user.  I didn't have that choice in PCC or share (on right-clicking a home folder).

I did try putting my username in as force user to <my username>.

Bingo, all worked.  I have no idea why.  I must say I would prefer not to use my username for all connections.

Robert