Building a Debian file server

debian4Schools will find a Debian file server useful where they need a free stable server for sharing files to students or teachers.

Virtual Hardware considerations

Workstation 6.5.  Choose “Linux 2.6.x Kernel” as the version.  Use a 4GB hard drive.  Keep 256MB of ram.  Remove the floppy drive.  The NIC needs to be bridged.The latest version of Debian can be installed using the latest netinst ISO file.



Hostname: data-01

Domain Name:  yourdomain (it will typically pick this up from your firewall).



Guided - Use the entire disk (4gb).

Separate /home, /usr, /var and /tmp partitions.


Passwords and other Naming Conventions

When naming machines using Linux always use lower-case.  In addition there are other components to consider when thinking of a naming convention and so here are some other helpers...

root password:  xxxxxxx

steven password:  xxxxxxx


The Mirror

Use the default UK mirror, in case there are any upgrades but don't add any predefined collections of software!  Choose Desktop environment, File server and Standard system.


Samba Server

  1. Workgroup/Domain Name:
    1. yourdomain.local
  2. Choose the default “No” to use WINS settings from DHCP server.


Install the GRUB boot loader

Choose the default installation and install to the MBR, and you now have a basic installation.  Make sure that you leave the CD in for package installations.


First Boot Up

When Debian boots for the first time you will want to make some initial configurations including the following:

  • Apply any updates outstanding
  • Uninstall network-manager
  • Tidy the panels
  • Change connection Settings for IceWeasel to auto-detect network settings
  • Set IP address to be static... with a gateway address of
  • Disable screen-saver


Install vmware tools

# apt-get install linux-headers-`uname -r` libx11-6 libx11-dev x-window-system-core x-window-system xspecs libxtst6 psmisc build-essential (You will need the Deb4-netinst cd for this).  Then install the vmware tools.


Backups and Templates

Now would be a good time to take a copy of the files for Backup and/or Template.



Now is a good time to create some groups.

# groupadd teachers
# groupadd students



Start with a teacher share that all the teachers can read/write to.  Then add a student share that all teachers can read/write and everyone else can read.  You will also need an area for network Home directories.

# mkdir -p /home/multiusers/teacher
# chown root:teachers /home/multiusers/teacher
# chmod ug+rwx, o+rx-w /home/multiusers/teacher
# mkdir -p /home/multiusers/student
# chown root:teachers /home/multiusers/student
# chmod ug+rwx, o+rx-w /home/multiusers/student
# mkdir -p /home/multiusers/sadmin
# chown root:sadmins /home/multiusers/sadmin
# chmod ug+rwx, o-rwx /home/multiusers/sadmin
# vi /etc/samba/smb.conf
comment = Teacher Drive
path = /home/multiusers/teacher
valid users = @teachers
force group = teachers
create mask  = 0660
directory mask = 0771
writeable = yes

comment = Student Share
path = /home/multiusers/student
valid users = @users
force group = users
create mask  = 0660
directory mask = 0771
writeable = yes

comment = System Admin Drive
path = /home/multiusers/sadmin
valid users = @sadmins
force group = sadmins
create mask  = 0660
directory mask = 0771
writeable = yes

# /etc/init.d/samba restart


Map groups

# net groupmap modify ntgroup=”Domain Admins” unixgroup=root
# net groupmap modify ntgroup=”Domain Users” unixgroup=users
# net groupmap modify ntgroup=”Domain Guests” unixgroup = nogroup


Add users

# useradd teacher -m -G teachers
# useradd student -m -G students
# useradd steven -m -G sadmins

# smbpasswd -a teacher
# smbpasswd -a student
# smbpasswd -a steven


Thanks for visiting.