forrow.com

Linux - Nova

WAN

Introduction

I set up a smb domain at home and have spent a while getting it working nicely. I thought it would be useful for others to be able to see how I have done it so have put this little site together with hopefully all the information you need. If you have any comments/problems email me (address available at forrow.com root). This is an ongoing document but I can't promise I'll keep it regularly updated, because no one ever does with personal websites. Last updated May 2004.

Features

Primary Domain Controller (PDC)

The following services are provided by my PDC (kryten)

DHCP

The easiest way is probably just to see my /etc/dhcpd.conf. A lot is explained in there. It assigns IPs in the 192.168.0.* range and talks to BIND to sort out the DNS for the new clients

DNS Server

Of course the dns server uses bind. Here is my /etc/named.conf. It hosts the nova.forrow.com domain forward and reverse (for my lan only) and all other requests are forwarded to my ISP's dns servers

Also, here is my /etc/resolv.conf which tells the local computer to use its local dns server, and also that its in the nova.forrow.com domain.

Below are the dns zone files for the nova.forrow.com domain forward and reverse.

Note: Most of the entries in the zone files above are entered dynamically as the dhcpd daemon assigns addresses to computers. Note that if you are using dhcp with a linux computer you must modify the ifcfg-ethX (with X is the device number) file to tell the dhcpd daemon what hostname it is. Add the line something like this: DHCP_HOSTNAME=beast

Samba

This sofware talks uses the SMB protocol to talk to (in my case) windows computers. It serves files, time and logon requests. Here is my /etc/samba/smb.conf

Because nova is a domain, users logon to it when they logon to windows. It then runs the novainit.bat logon script which maps network drives and copies some shortcuts to the start menu which I want to be global. You will notice it installs a .reg file to the registry. This is to rename the drive that is mapped, and is just a registry export file of 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints\G'

I use the MS User/Server Manager for domains tools to administer the domain which are available here

Groups samba knows about with their mappings to Windows Groups (using 'net groupmap modify' (check the man page))

As an administrator I use 'domainroot' and for a guest I use 'domainguest'

Policies

I use NT stylee policy files to enforce settings on the domain. I have found some policy template files (.adm) that work with the old policy editor but to get the most policy settings you need to use the new ones which are not compatible. I have created a programme that converts the new style adm files to the old style for use with poledit. Its by no means perfect but can do a lot of conversions. I have also provided the windows 2000 template already converted


RAID

Note: I do not boot from raid

I use the kernel built-in raid level 1 which mirrors the data across two harddisks which contain my data. Because the box I use is quite old the max capacity is 60Gb (that took a bios update). I partitioned the harddisks to have a single partition on each with exactly the same size using fdisk. I then set the partition type to be 'Linux auto raid' (hex 'fd') which causes the kernel to setup the array when it boots. I used this /etc/raidtab to define my array. Using the raidstart and raidstop command I can control the array. Once started the kernel creates a device (/dev/md0 in my case) which acts just like a harddisk (can be mounted) but when written to it actually writes to the two disks. If the array is stopped this device will vanish. Check the /proc/mdstat for raid status. Use the watch command to continuously monitor it (takes time performing raid operations).

I had a problem with one harddisk (bad sector) a few weeks after installing it (shown in /proc/mdstat by the 'F' flag). RAID had disabled the drive so I removed it and ran off one drive until I got a replacement. I put the new harddisk in and used the raidhotadd command to add the new disk to the array.


Tips

© 2005-2006 forrow.com