Originally Published: Sunday, 15 July 2001 Author: Dave Markowitz
Published to: enhance_articles_sysadmin/Sysadmin Page: 3/4 - [Printable]

Building a Server Appliance with Trustix Secure Linux and Webmin

To command by line or GUI, that is the question. Or, hey, does it really matter? Linux.com contributor Dave Markowitz says it does if we want to get Windows admins using Linux. This week Markowitz takes us through an open-source server appliance installation that is secure, powerful and controlled from the GUI.

  << Page 3 of 4  >>

One of my fellow geeks at work recently showed me a Red Hat box on which he configured Webmin. (Thanks Tom C.) This is an open source web-based administration tool for UNIX, sponsored by Caldera and made available under the BSD license. Webmin's homepage is http://www.webmin.com. It runs on a variety of UNIX flavors, not just Linux. This allows us to have a common GUI for all of our UNIXish systems, whether they're running Linux, BSD, or whatever. Anyway, I had long wanted to try out Webmin and this finally got me to stop procrastinating. I decided to combine Webmin with Trustix and see how they worked together.

One thing I had to do first, though, was to enable a way to get Webmin onto the Trustix box. I could have used the standard CLI ftp client to download it directly, but I found it easier to download Webmin onto a Windows machine and transfer it over to the Trustix server using Samba. Since I've done some hacking with Samba, and I want to use this PC as a fileserver for Windows clients anyway, I created a Samba share on the machine by manually editing the smb.conf file and adding my regular user's home directory as a network share.

A bare bones smb.conf file that will allow this looks like:

<begin smb.conf>

#====== Global Settings =============

[global]

# workgroup = NT-Domain-Name or Workgroup-Name 
workgroup = midearth

# server string is the equivalent of the NT Description field
server string = Trustix Samba Server

# This option is important for security. It allows you 
# to restrict connections to machines which are on 
# your local network. The following example restricts 
# access to two C class networks and the "loopback" 
# interface. For more examples of the syntax see 
# the smb.conf man page
hosts allow = 192.168.10.127.


#======= Share Definitions ==========

[homes]
writable = yes
comment = Home Directories
browseable = no

[frodo]
valid users = frodo
path = /home/frodo
write list = frodo

<end smb.conf>

I then used the smbpasswd command to sync the passwords for my Windows, Linux, and Samba user accounts. E.g.,

root@bagend# su frodo
 frodo@bagend$ smbpasswd New SMB password: (The password is not
   echoed to the screen.)
 Retype new SMB password:
 Password changed for user frodo
 frodo@bagend: exit
 root@bagend#

I then started the Samba daemon (smbd), and the directory showed up on my Win2K box in My Network Places. Starting smbd is done with the following command:

root@bagend# /usr/sbin/smbd start

Then I used ntsysv to select smb as one of the daemons that start automagically on boot.

Readers who need more information on Samba can go to the official website at http://www.samba.org. Also, I've found "Using Samba" from O'Reilly to be a very useful resource. In fact, the whole book is available online at http://www.oreilly.com/catalog/samba/chapter/book/index.html.

After firing up Samba, I was able to copy the Webmin tarball over to the Linux PC and install it. (Although Webmin is available in RPM format, I chose to get it as a UNIX tar.gz file, since the RPMs are not specifically made for Trustix.) After it's copied over and in the right directory (I moved it to /opt), your untar it by:

root@bagend# tar -xvzf webmin-0.86.tar.gz

This created a directory named webmin-0.86 under /opt. You then cd to that directory and run the setup script:

root@bagend# cd webmin-0.86
root@bagend# ./setup.sh

Webmin's interface is in a word, slick. Much like the Cobalt Qube and Rebel Netwinder, it allows you to admin a Linux box through your web browser. Most system administration tasks can be performed through Webmin's default modules, and many third-party add-ons are available. The login screen you get when you first connect to the box through your browser looks like this:

[Login Screenshot]

In effect, Webmin allows you to take a regular PC and turn it into a "server appliance." A separate web server, like Apache, is not required, since Webmin installs its own.





  << Page 3 of 4  >>