SAMBA (Domaincontroller) Server For Small Workgroups With Ubuntu 6.10 - Page 3

Want to support HowtoForge? Become a subscriber!
 
Submitted by till (Contact Author) (Forums) on Sun, 2007-03-25 18:53. ::

2 Installing And Configuring The Rest Of The System

Enable root user

Now I can log in with the username administrator and the password I entered above. I will enable the root user first for ease of installation. You can disable it later if you want.

sudo passwd root
su

Now we are logged in as root user.

Hint: This step is optional, if you don't want to enable the root user for security reasons, plese run the command

sudo su

to switch to root without enabling the root user to log in directly.

 

Configure The Network

Because the Ubuntu installer has configured our system to get its network settings via DHCP, we have to change that now because a server should have a static IP address. Edit /etc/network/interfaces and adjust it to your needs (in this example setup I will use the IP address 192.168.0.100):

vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
        script grep
        map eth0

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1

Then restart your network:

/etc/init.d/networking restart

Edit /etc/hosts and add your new IP addresses:

vi /etc/hosts

127.0.0.1       localhost.localdomain   localhost       server1
192.168.0.100   server1.example.com     server1


# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

 

Setting the Hostname

echo server1.example.com > /etc/hostname
/bin/hostname -F /etc/hostname

 

Edit /etc/apt/sources.list And Update Your Linux Installation

Now we edit the file /etc/apt/sources.list to enable the Ubuntu universe repository:

vi /etc/apt/sources.list

It should look like this:

#
# deb cdrom:[Ubuntu-Server 6.10 _Edgy Eft_ - Release i386 (20061025.1)]/ edgy main restricted


#deb cdrom:[Ubuntu-Server 6.10 _Edgy Eft_ - Release i386 (20061025.1)]/ edgy main restricted

deb http://de.archive.ubuntu.com/ubuntu/ edgy main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ edgy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ edgy-updates main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ edgy-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://de.archive.ubuntu.com/ubuntu/ edgy universe
deb-src http://de.archive.ubuntu.com/ubuntu/ edgy universe

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://de.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse


deb http://security.ubuntu.com/ubuntu edgy-security main restricted
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted
deb http://security.ubuntu.com/ubuntu edgy-security universe
deb-src http://security.ubuntu.com/ubuntu edgy-security universe

Now we load the new sources and update our system:

apt-get update
apt-get upgrade

 

Install SSH Daemon

apt-get install ssh openssh-server

 

The Next Steps...

Now you can log in to your Server with an SSH Client like PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/). It's easier to follow this howto if you connect to your server with PuTTY and copy and paste the commands. If you want to edit config files on the server, you can use commandline editors like vi, pico or joe or use a program like WinSCP (http://winscp.net/eng/docs/lang:en) to edit the files over your SSH connection in a Windows client.

 

Quota

apt-get install quota

Edit /etc/fstab to look like this (I added ,usrquota,grpquota to the partitions with the mount point /):

vi /etc/fstab

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda1
UUID=226d9304-88ca-44c0-a3e3-d1ad26cfc084 /               ext3    defaults,errors=remount-ro,usrquota,grpquota 0       1
# /dev/sda5
UUID=d824ce36-04b8-4870-83f4-f1a5037c2de4 none            swap    sw              0       0
/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto     0       0

Then run:

touch /quota.user /quota.group
chmod 600 /quota.*
mount -o remount /
quotacheck -avugm
quotaon -avug

You will get a error like this when you run the command quotacheck -avugm the first time:

quotacheck: WARNING - Quotafile //quota.user was probably truncated. Cannot save quota settings...
quotacheck: WARNING - Quotafile //quota.group was probably truncated. Cannot save quota settings...

That is normal and nothing to worry about!


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.