Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to set-up a network in our office. We only use Linux on our 5 computers, always the same distro/version among all. I would like to do the following:
* Share one drive/partition among all computers.
* Maybe share /home ?
* Share printer among all computers.
* Maybe share scanner.
Sadly, it seems that all networking tutorials for noobs on the internet are about Samba. But I'm interested about the native Linux (Unix) solution, which (in principle) should be easier...
*** SHARE DRIVE ***
For sharing drives/partitions among different computers, it seems that I will need to set-up NFS:
* I don't know how to find out the IP's involved (like 192.168.0.100). All computers are hooked to a router/modem here at the office.
* Isn't it possible to set-up NFS with the computer's hostnames?
*** SHARE /home ***
That's not a priority right now, but if everything works well with the shared drive, then I might want to share /home. I guess, that we could easily share computers among our workers, that way.
Some concerns/questions about that:
* Drive/network speed/load. As said before, we just have a few computers/users, and we don't do heavy calculations. Mostly internet, and a little bit office. It's difficult for me to figure out the loads I could expect on a shared drive like this. (Will it get slow to use? Will I need RAID?) That's one reason, I first want to share just one partition (without all the /home config files). Any thoughts about this?
* Users/Groups. I've already set-up all users/groups to have the same IDs on all machines. Any other precautions/steps that are necessary?
*** SHARE PRINTER ***
I really don't have a clue about how to do this (without Samba).
*** SHARE SCANNER ***
This is my last priority, right now, so I haven't searched for that. But I found a tutorial by chance (http://www.linux.com/articles/57798). So, I hopefully won't need help with this.
*** ANYTHING ELSE? ***
Any other thoughts or ideas that could be helpful in this situation?
I'm also an newbie and i use between my pc's FTP and samba.
For viewing the ip adres, you have to use the command "ifconfig".
Use this command as super user.
Two year ago I also wanted to share drives on the linux way. But other users warned me about security risks. So this is why I use between my Linux PC's FTP protocol en between my linux and windows pc's samba.
For sharing a printer, in cups you can share your printer.
On the www.tldp.org website, there is a Linux Filesystem Hierarchy System document. It lists some directories like /bin/ and /usr/bin/, etal that are static and sharable. You may want to download the document for a guide on which directories you can share and which you cant. Having a shared, static (ro) directory will allow you to administer your system on only one computer instead of all of them. Having similar hardware and the same distro/version makes that easier as well.
You can have a persons home directory be located on a mounted /home share. For example, the /home/ directory could be an NFS share on a NAS device. You don't want several users using the same $HOME directory however. I'm not sure what you meant by the same uid's. If you mean that user john is on each of the computers with the identical UID, that is fine. If you mean that user john has the same UID as sally, that isn't. Having a user running two kde sessions at the same time will cause problems. ( As would be the case if you have john & sally with the same uid and sharing /home/user/ as their home directory. ) I.E. Share /home, but don't share /home/username/.
For viewing the ip adres, you have to use the command "ifconfig".
Excellent. 'sudo ifconfig -a' show addresses like '192.168.1.106' or '192.168.1.108' for different computers. Since they are assigned via DNS, i think that I have to set-up IP ranges in NFS
Quote:
Two year ago I also wanted to share drives on the linux way. But other users warned me about security risks.
It would be nice to know more details about those risks. This comes really as a surprise to me, since Linux/Unix is known to be quite safe for networks.
Quote:
So this is why I use between my Linux PC's FTP protocol en between my linux...
In this case, FTP is impossible. Our users are very un-savvy and it will be hard even to teach them to save the files in a '/mycompany/subdir' directory, instead of any default (unknown) place.
Quote:
For sharing a printer, in cups you can share your printer.
Excellent! In 'http://localhost:631/admin', under 'Server', there's an option for sharing. I can't test it right now, but this shouldn't be a problem.
there is a Linux Filesystem Hierarchy System document. It lists some directories like /bin/ and /usr/bin/, etal that are static and sharable.
I think, this is overkill for me. I'm just trying to set-up a '/mycompany' shared drive, which is mounted on all local machines.
Quote:
I'm not sure what you meant by the same uid's. If you mean that user john is on each of the computers with the identical UID, that is fine.
Yes, that's how I set it up. I see, that this is not longer really necessary once I set-up a NIS server, which handles these details for me. Thanks for the suggestions and link, which will be really useful for the shared /home dir setup.
This means
* The exported share may be mounted by *.kanarip.com. Here you can
write a single host or a network group or a network
* The share is read-write
* The share is root accessible
* Saving the files has to be done before the NFS server resond.
Now start the NFS deamon :
Code:
# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
# service nfslock start
Starting NFS statd: [ OK ]
Now make that the server will start on the next reboot :
Code:
# chkconfig nfs on
# chkconfig nfslock on
By the way, if you do some changes in the /etc/exports file. you can execute them without restarting :
Code:
# exportfs -a
This is for the server side.
------------------------------------------------------------------------
Now for the client side:
Automatic mounting of home dir
There are some services that need to run:
* portmap
* nfslock
* netfs
To start this services:
Code:
# service portmap start
# service nfslock start
# service netfs start
# chkconfig portmap on
# chkconfig nfslock on
# chkconfig netfs on
Now we have to make sure that autofs will mount the home dir.
Change pinky.kanarip.com by the FQDN (Fully Qualified Domain Name) of the NFS server.
Now start the autofs server and make sure it will start next time:
Code:
# service autofs start
# chkconfig autofs on
So now you have shared the home dir ;-)
I think that if you want to share a drive you have to mount him on the server and you have to create a empty folder on the clients. then to share ,it's identical to the home dir ;-).
Gnome
Last edited by Gnome_Leader; 12-18-2007 at 06:04 AM.
Thanks for all the great help!
Right now, I am setting up the static LAN IP address for my server. There's plenty of information about that on the web, so I'll go through a lot of reading before I can come back to the directory and printer set-up.
@arubin:
Thanks for the link. Excellent tutorial! Will use this for my printer setup.
@Gnome:
According to the link posted by jschiwal:
Quote:
An answer to the question if you took NIS or NIS+ whould depend on the security you want. NIS does not support shadow passwords, on the other hand NIS+ is more complicated to configure.
Maybe this is the security concern you were told about.
I'm very happy, that the setup of the static IP for my LAN was very easy on Xubuntu. I only had to add the entry on my local machine, no set-up on the Linksys router was necessary. I had to choose an IP that does not conflict with any of the router's reserved addresses (*.1 router, *.255 broadcast, *.100-149 DHCP).
Since 'ifconfig -a' showed '192.168.1.*' addresses, I set-up my '/etc/network/interfaces' file as follows:
Honestly, I really don't understand almost nothing about routers, IPs, and DHCP. But from what I read in the Linksys forums, these routers only use the range from *.100 to *.149 for DHCP. So all other addresses (except *.1 and *.255, of course), are free to be used.
EDIT: I just checked the router's manual. Default 'Starting IP Address' is 192.168.1.100, and default 'Maximum Number of DHCP Users' is 50. Thus, the answer above seems to be correct, only *.100 through *.149 are reserved.
Setup of the shared printer is very simple under Ubuntu Feisty. In 'http://localhost:631/admin/' under 'Basic Server Settings:' I just had to check the 'Share published printers connected to this system' option. After this, my printer is visible immediately on the remote machine.
I had a short problem with a 'Request Entity Too Large' error message when I tried to print from the remote machine. But this was caused because I had not enough disk space there. Everything went fine after freeing some space.
BTW: For this you don't really need a static IP. It works perfectly with dynamic IP, too.
Since the printer network setup was so easy, I started working on the scanner. But I'm completely stuck now. It is an Epson Stylus CX3900 all-in-one, which works with the DX4000 scanner driver. I've set it up successfully on the server using the following instructions: http://ubuntuforums.org/showpost.php...2&postcount=15
On the Server Side
========================================
Perhaps pointing out the obvious but you will have five users doing nothing if your NIS server goes down.
Consider having the /home directory for each user on his own machine. Joe's box[1] would have a /etc/passwd[shadow] entry setting his home directory to /home/Joe. On your NIS server create users (same uid as you say you are doing) and assign their home under /home/users/ . Thus Joe on the NIS server would be /home/users/Joe with same info in the NIS server passwd file.
Now when Joe sits at his box: He logs in and passwd sets his home to /home/Joe.
when Joe sits at any other box: He logs in (thru the NIS server) and his home is set to /home/users/Joe
Last step is to use rsync to keep home directories on NIS server in sync with "sits at" boxes.
Perhaps pointing out the obvious but you will have five users doing nothing if your NIS server goes down.
Yes, it is obvious, but I never really thought about the consequences. You're absolutely right, it is not safe to share /home this way! And in my case it can definitely be avoided.
I like your suggestion of rsync. I've been reading about possibilities now, and I think, that it could be set-up similar to the laptop/desktop-sync scenario: syncing must be done both ways.
The piece that I'm missing is how to trigger rsync. It would be nice to start the process when the user logs out, or when the computer is idle. (It's really hard to get the users to log out when they finished using the computer!)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.