Click to See Complete Forum and Search --> : Basic network help
another_noob
11-18-2003, 08:22 PM
Hi,
I've just set up my first network between my desktop and laptop. So far I've got each other to
recognise they are there and also set up the desktop as a router but I don't have a clue about setting up file sharing between the two machines. I would like for each to have a /home/share directory that each machine can see. I did a search and tried the smbclient -L command but it timesout and gives and connection error. The desktop is 10.0.0.1 and the laptop is 10.0.0.2.
Cheers
bosox79
11-18-2003, 08:32 PM
Originally posted by another_noob
Hi,
I've just set up my first network between my desktop and laptop. So far I've got each other to
recognise they are there and also set up the desktop as a router but I don't have a clue about setting up file sharing between the two machines. I would like for each to have a /home/share directory that each machine can see. I did a search and tried the smbclient -L command but it timesout and gives and connection error. The desktop is 10.0.0.1 and the laptop is 10.0.0.2.
Cheers
Hi we are going to need some more information in order to help you with this problem. Like is this a linux only network? what distro are you running? is this a wired or wireless network? :D
another_noob
11-19-2003, 05:02 AM
Thanks for the reply
Both machines are using JAMD linux. it's a simple ethernet LAN two machines, two ethernet cards, one crossover cable.
all I need to know is how to access files from either machine
Cheers
Satanic Atheist
11-19-2003, 07:20 AM
The two possibilities are Samba and NFS (Network FileSystem). Since this is a Linux only network, NFS is the preferred choice as it is more suitable to work between Linux filesystems.
You should find "nfs.conf" or something similar in /etc/ and also take a look at "exports". The Man pages will help you (man exports).
I'm sorry I can't be of too much use at the moment, but I'm not sitting at a Linux machine.
James
PS Be careful about what you post as your thread title, the Mods have a way of locking threads that aren't descriptive of the problem.
cowanrl
11-19-2003, 07:25 AM
With just 2 Linux machines like that, I think the simplest thing to use for file sharing is NFS. I'm not familiar with JAMD Linus but most distros of Linux install what is needed for
NFS by default. Also, since you are on a closed network like that, security isn't and issue.
Here's a help file I made up on setting up NFS on a Red Hat machine. Hopefully you can apply most of it to your situation:
Network File System(NFS) is a means of sharing hard drive space on a Linux computer.
NFS administration on Linux/Unix is really quite simple. On the machine you want to share HD space for access
via the network, you export a directory. On the machine you want to access the export or “share”, you mount it
similar to mounting a physical volume on the machine. As in everything in Linux, it’s just a matter of configuring the proper file.
On the sharing computer, you need to set up the directories you want to share in the /etc/exports file.
When NFS is started, it reads this file and sets up the shares. It is then ready to be mounted via the network.
Of course, like any other directory/file structure, you need to set proper permissions for people to be able to see
and use what you share.
Here’s an example of how to accomplish these tasks in RH7.
Configure /etc/exports
Here’s some examples for /etc/exports:
· /home anyserver(rw) anotherserver(ro) – this shares out the directory /home and allows a mount with
r/w access from server anyserver and a mount with read only access from server anotherserver. Even though the
share can be mounted, what an end user can see or do depends on the permissions you set.
· /home/fred 192.1.1.3(noaccess) – this keeps anyone on 192.1.1.3 from mounting the directory
/home/fred. This wouldn’t stop anyone else from accessing this directory if there was another entry for it in
the exports file
· /home *.Marconi.com(rw) – this is basically the same as the first example only anyone from Marconi.com
could mount the share.
· /home 192.168.34.0/24(ro) – anyone on the 192.168.34.0 network would be able to mount the share
with read only access
· /home anyserver(rw,map_static=/etc/anyserver.map) – this
gives anyserver access. The anyserver.map file is used to match user or group id’s on anyserver with user or
group id’s on the local server. You may need this because Linux uses user and group id’s instead of user
and group names to grant access. All group and user settings would then match on the 2 servers. Here’s an
example of a map file:
o uid 501 504
o uid 503 503
o gid 103 100
o The first column is the client, the second column is the server. You may need to do this because user
rcowan on anyserver may have a uid of 501 and user rcowan on localserver may have a uid of 504. User
smilk may have the uid of 501 on local server and user rcowan could get access to smilk’s files.
Start nfsd
In RH 7.2, you can use the Service Configuration program to start and stop the nfs daemon. It can also be
done by hand as shown here.
Once the exports file is configured, you then need to start the nfs dameon. On RH7 this is done with:
· /etc/rc.d/init.d/nfs start
· There are several options for nfs – start, stop, status, restart, reload. The default is start
To accomplish this at start up, you need some symbolic links from /etc/rc[3|5].d to the nfs file. The filename in
rc[3|5].d needs to be S60nfs. The command to create these links would be:
* ln –s /etc/rc.d/init.d/nfs /etc/rc3.d/S60nfs or
* ln –s /etc/rc.d/init.d/nfs /etc/rc5.d/S60nfs
This will automatically start the nfs dameon at boot time.
Mount nfs shares on the network
By default, you need root privileges to mount an NFS share on the network.
The command used on a client to mount a share is:
mount server:/path /mountpoint
server can be any valid means of addressing the server such as IP address or hostname. /path is the path that
was shared on the server. /mountpoint must already exist on the client. Once you mount the share, just
change to the /mountpoint directory and “voila”, it’s there. You’ll see what you’ve been given permission to see.
To mount nfs shares at boot time, you need an entry in the /etc/fstab file something like this:
nfs share name mount point fs options dump fsck
server:/nfsname /server/home nfs rw 0 0
You should take a look at the man pages on nfs, nfsd and exports.
another_noob
11-19-2003, 09:13 AM
Thanks for the replies
It turns out that the nfs demon was not installed. I've installed it on both machines and it is starting up fine when the machine boots. I created an entry in the exports file (below)
/home/share 10.0.0.2(rw)
and
/home/share 10.0.0.1(rw)
on the other one
when I go to the terminal and type the mount command it comes up with an error
mount: RPC: Remote system error - Connection timed out
mount 10.0.0.1:/home/share /mnt/share
Everything seems to be working fine (eth0 is active on both machines, so is the nfs demon)
Thanks again
another_noob
11-19-2003, 09:25 AM
I've just discovered it was my firewall that I made some changes to last night that was stopping the connection.
Thanks again for all your help
I'll make sure that I try to pass the help on if I can help on the forum
bosox79
11-19-2003, 04:45 PM
Originally posted by another_noob
I've just discovered it was my firewall that I made some changes to last night that was stopping the connection.
Thanks again for all your help
I'll make sure that I try to pass the help on if I can help on the forum
I am glad that you are now up and running :D and you are welcome