LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-17-2007, 08:58 AM   #1
jjalocha
LQ Newbie
 
Registered: Dec 2007
Distribution: Xubuntu
Posts: 23

Rep: Reputation: 15
Question Small Linux-Only Network


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:

(http://www.linuxquestions.org/linux/...rking/Easy_NFS)

(http://gentoo-wiki.com/HOWTO_Share_Directories_via_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?

Thanks,
-Jerzy
 
Old 12-17-2007, 09:25 AM   #2
Gnome_Leader
LQ Newbie
 
Registered: Oct 2007
Distribution: Fedora 7
Posts: 6

Rep: Reputation: 0
ip adress + network

Hi,

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.

Gnome
 
Old 12-17-2007, 09:49 AM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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/.

Here is a howto in setting up NIS so that a user can log into any computer and have their home directory available:
http://www.linuxnetmag.com/en/issue6/m6nis1.html
 
Old 12-17-2007, 10:18 AM   #4
jjalocha
LQ Newbie
 
Registered: Dec 2007
Distribution: Xubuntu
Posts: 23

Original Poster
Rep: Reputation: 15
@Gnome_Leader

Quote:
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.
 
Old 12-17-2007, 10:27 AM   #5
jjalocha
LQ Newbie
 
Registered: Dec 2007
Distribution: Xubuntu
Posts: 23

Original Poster
Rep: Reputation: 15
@jschiwal

Quote:
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.
 
Old 12-18-2007, 02:29 AM   #6
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Rep: Reputation: 55
as far as printing is concermed the tutorial on this site is excellent.

http://www.linuxquestions.org/linux/...ter_using_CUPS

Last edited by arubin; 12-18-2007 at 02:29 AM. Reason: spelling
 
Old 12-18-2007, 05:51 AM   #7
Gnome_Leader
LQ Newbie
 
Registered: Oct 2007
Distribution: Fedora 7
Posts: 6

Rep: Reputation: 0
NFS (sharing home dir)

I don't know the risks any more. It was a person from my work that warned me. I don't know if it's correct.

For sharing Home dir:

- Be sure that the nfs server is installed

- The nfs server is configured with a few files like:

* /etc/exports : Here you determine the folders shared by NFS
For instance if you want to share home folders, it looks a bit like this
Code:
# /etc/exports
/home                  *.kanarip.com(rw,no_root_squash,sync)
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.

This is done in /etc/auto.master

Code:
# /etc/auto.master
/home      /etc/auto.home --timeout 5
Now if you go into the directory /home, the file /etc/auto.home will be read to see what has to be mounted

In the file /etc/auto.home you write that the NFS share /home has to be mounted. So change the file like this:

Code:
# /etc/auto.home
*   -fstype=nfs,soft,intr,rsize=8192,wsize=8192,nosuid,tcp \
    pinky.kanarip.com:/home:&
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.
 
Old 12-18-2007, 09:23 AM   #8
jjalocha
LQ Newbie
 
Registered: Dec 2007
Distribution: Xubuntu
Posts: 23

Original Poster
Rep: Reputation: 15
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.
 
Old 12-18-2007, 10:42 AM   #9
jjalocha
LQ Newbie
 
Registered: Dec 2007
Distribution: Xubuntu
Posts: 23

Original Poster
Rep: Reputation: 15
Smile static LAN IP setup

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:

Code:
auto eth0
iface eth0 inet static
	address 192.168.1.200
	netmask 255.255.255.0
	network 192.168.1.0
	broadcast 192.168.1.255
	gateway 192.168.1.1
And then restart networking:
Code:
$ sudo /etc/init.d/networking restart
 
Old 12-18-2007, 11:10 AM   #10
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Rep: Reputation: 55
Don't you have to take some precaution to exclude that address from the DHCP pool in case the router issues that address to another computer
 
Old 12-18-2007, 11:28 AM   #11
jjalocha
LQ Newbie
 
Registered: Dec 2007
Distribution: Xubuntu
Posts: 23

Original Poster
Rep: Reputation: 15
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.

See http://forums.linksys.com/linksys/bo...ssage.id=10074, specially message #8.

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.

Last edited by jjalocha; 12-18-2007 at 11:50 AM.
 
Old 12-18-2007, 11:32 AM   #12
jjalocha
LQ Newbie
 
Registered: Dec 2007
Distribution: Xubuntu
Posts: 23

Original Poster
Rep: Reputation: 15
Smile shared printer setup

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.
 
Old 12-18-2007, 05:31 PM   #13
jjalocha
LQ Newbie
 
Registered: Dec 2007
Distribution: Xubuntu
Posts: 23

Original Poster
Rep: Reputation: 15
Question shared scanner problems

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
========================================

According to http://www.linux.com/articles/57798, various threads and manuals, I did the following setup for the network setup:

In '/etc/sane.d/saned.conf' add the following lines:
Code:
192.168.1.0/24
192.168.1.106
(It should be enough with only the first one.)

Install inetd:
Code:
$ sudo aptitude install openbsd-inetd
'/etc/services' already contains a correct 'sane-port' entry, nothing to do there.

Add the following entry to '/etc/inetd.conf':
Code:
sane-port stream tcp nowait saned.saned /usr/sbin/saned saned
This is correct according to the manual. 'saned' user seems to be properly set-up.

Restart 'inetd':
Code:
$ sudo /etc/init.d/openbsd-inetd restart
At this point, I'd like to check if everything is set-up correctly. The only reference I found was to run 'saned -d'...
Code:
$ saned -d
[saned] main: starting debug mode (level 2)
[saned] main: [0] bind failed: Address already in use
[saned] main: [1] bind failed: Address already in use
[saned] main: couldn't bind an address. Exiting.
...and these bind errors were supposed to be correct. Anyone knows of a better test?


On the Client Side
========================================

Code:
$ sudo aptitude install xsane sane-utils
Add the server to '/etc/sane.d/net.conf':
Code:
192.168.1.200
192.168.1.0/24
Again, the first line should be enough.

When I run 'sudo scanimage -L' nothing gets detected.


Questions
========================================

1) Is it possible to check if 'saned' is set-up correctly?

2) How do I know if sane (client-side) is really checking on the network? ('sane-find-scanner' only tests USB and SCSI.)

3) Anyone knows what I'm doing wrong?
 
Old 12-19-2007, 06:13 AM   #14
PDock
Member
 
Registered: Aug 2004
Distribution: Slack10 & curr. tried numerous
Posts: 189

Rep: Reputation: 36
sharing home directory

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.

Just a concept you might want to explore
ppd
 
Old 12-19-2007, 07:59 AM   #15
jjalocha
LQ Newbie
 
Registered: Dec 2007
Distribution: Xubuntu
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
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!)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Small linux box as a wireless router/home network ideas enine Linux - Wireless Networking 16 05-09-2006 09:25 PM
small network windows to linux warpedlinuxmind Linux - Networking 1 07-31-2005 11:58 PM
Centralized management of a small Linux network... linuxpyro Linux - Networking 3 08-24-2004 01:53 PM
Is Linux right for small office network? glenn69 Linux - Networking 1 07-29-2004 11:59 PM
Small Network -- Linux Web, DNS, SAMBA server -- Help/suggestions please! Bungo2000 Linux - Networking 2 03-30-2002 09:55 AM


All times are GMT -5. The time now is 12:07 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration