Webmin at 10

Webmin is ten years old today. I recently took some of Jamie’s time away from Webmin to ask a few questions about where it’s been, the spin-off projects, and the goals achieved. More interesting, however, is what is Jamie working on now?

My questions are italicized, and Jamie’s responses are in the regular font.

When was the first release of Webmin?

I looked at the tar file for the 0.1 release of Webmin, and it was dated 3rd October 1997 .. it’s amazing that this was 10 years ago now! And even more so that I still have all the released tar files since then, despite numerous hard drive crashes and moves over the years.

I was working in Singapore at the time for a local company called National Computer Systems, and the idea for Webmin came out of a small set of CGI scripts that I did at work for managing DNS. I figured, if you can use a browser to manage a DNS server, why not the whole Unix system?

Fortunately I’d just won a Sun workstation in a Java programming contest, which had a (for the time) massive 64 megabytes of RAM and 2 GB of disk. So I had a pretty good machine at home to do development on. That’s why Solaris was the first operating system that Webmin supported, and why it is still a top-tier OS today.

Webmin version 0.1
Webmin version 0.1

Even a project as big as Webmin had to start somewhere. What did the first released version of Webmin do?

From looking at the modules in the original file, the first version managed only Cron, NFS shares, the BIND 4 DNS server, Inetd, bootup actions, mounted filesystems, Samba, and Unix users and groups. And it ran only on Solaris, Redhat Linux and Slackware.

The user interface in that first version looked pretty bad, but the basic design of Webmin was the same as it is now – a web server written in Perl and running as root, which then ran various CGI scripts. A big part of the work was writing that webserver, as Apache refused to run as root and setting up suexec or setuid root CGI scripts was too tricky to do in software that other people would be installing.

Why did you write Webmin?

Back in university when I first started using the first graphical web browser (Mosaic), it became apparent that the browser was a great interface for applications. Users didn’t have to install anything – just open a URL, and the app was there.

Of course this seems totally normal now, but back in the day almost all graphical applications were programs that you’d have to install and run .. and developing them was a lot of work, especially if you wanted to write something that many people could access at once, or which could be used remotely. So the web to me looked like a much easier platform for many types of applications – the first significant one that I wrote was an interface to the university library catalog, which until then could only be queried using an arcane command-line interface.

Shortly after graduating I was working as a sysadmin and software developer, and was getting a lot of requests to make updates to the company’s DNS domain. In those days, the only way to do this was to telnet into the DNS server as root, and edit a configuration file using the vi editor. This wasn’t something that a non-admin could be trusted to do, as one typo could wipe out the whole DNS domain.

So the natural solution to this problem was a web-based application for DNS management. This would protect users from themselves, save me time spent handling trivial sysadmin tasks, and only give users the rights to make changes to the settings related to DNS. This is what effectively grew into Webmin.

Webmin gets graphic
Webmin gets graphic

Webmin, Usermin, and Virtualmin now contain over 400 thousand lines of code, according to SLOCCount. Any idea how many lines of code were in the first public release of Webmin?

Lucky I still have that original tar file – it contained 17530 lines of code.

With over 8 million downloads, and over two million new downloads every year, Webmin is popular. Does popularity matter to you?

Not really – and even though Webmin has a lot of users, very few of them could name the author, so hardly any of the people I meet know that ‘Jamie Cameron’ was it’s developer.

Still, it is nice to know that something I’ve written has been so widely used.

Web-based system administration was a new concept when the first public release of Webmin occurred. It seems like a no-brainer now, but dozens of competing projects that ran on the console or X have come and gone. Was there a blinding flash of insight, a particular requirement in the original version, or did you just accidentally stumble into building a web-based tool that could stand the test of time?

I think the web interface was the key – other tools like Linuxconf, YaST and Redhat’s Gnome sysadmin applets replicated some of the functionality of Webmin over the years, but none of them made remote access easy. YaST and Redhat’s tools are X-only application, which means that they can be run only at the console of a Linux box, or from a Unix system on the same LAN. Linuxconf had multiple interfaces (web, X and command-line), but this abstraction meant that none of them were very good.

Even though there is a lot of talk about Linux on the desktop, it seems that the vast majority of Linux systems are servers managed remotely. So any administration tool has to work across the Internet, and a browser-based interface is perfect for that.

Another plus that Webmin had over competitors was its support for multiple operating systems and Linux distributions. A huge amount of work has gone into providing the same basic user interface and functions regardless of whether it is installed on Fedora 7, Solaris 2.5 or Mac OS X, even though those systems all use different configuration file formats and locations under the hood.

Thoroughly Modern Minnie

Thoroughly modern Minnie

There have been numerous major milestones in Webmin over the years: advanced ACLs, branching Usermin for user-level tasks like webmail, branching Virtualmin for virtual hosting management, conversion to a modular and theme-able UI library, and a dozen or so new modules each year. What’s the next big project in Webmin? Do you plan very far ahead?

The next big thing I am working on is called VM2 (Virtualmin Machine Manager), which is a Webmin module for managing Xen domains, VServers, Solaris Zones and Amazon EC2 instances. From a single control panel you’ll be able to manage multiple host systems, each of which can in turn run multiple virtual systems.

Initially at least this will be a commercial application, targeted at the hosting market – it will be tied closely into Virtualmin, and allow virtual servers to be managed across multiple systems. I feel there is a huge demand and market for this kind of software, as hosting companies are moving more towards virtualization now that Xen is well supported in the Linux kernel, and shipped by several Linux distribution vendors.

On the Webmin core side, the biggest task is user interface cleanups and consistency improvements, which involves re-writing many of those 400k lines of code. Also on the cards is better LDAP integration in the Postfix and SpamAssassin modules, better support for ClamAV, and perhaps a module for managing an LDAP database server.

Speaking of architectural changes, Webmin is predominantly a Perl application. Have there been any particularly painful transitions over the years, either due to changes in Perl or changes in your own design of Webmin?

Not really – Perl has been very good at backwards compatability, and I can remember only one case where some change in Perl itself broke Webmin. That was when they switched to UTF-8 mode by default when reading files, which broke my code that read binary files like images.

The biggest recent architectural change in Webmin was an update that replaced all code which wrote to files with wrapper functions that checked if all writes succeeded, and only replaced the target file with a complete new version if everything went OK. This was a lot of work due to the vast number of places in Webmin where files are written, but was worth it to protect the user againsts situations where critical files like /etc/passwd are half-written due to the system running out disk space!

Any thoughts on Perl 6?

I’m reserving my judgements until it actually gets released! That said, Webmin doesn’t really push Perl 5 to its limits, so hopefully it will run fine under the final version of Perl 6.

Webmin does a lot. It’s functionality encompasses that of dozens of single-purpose tools, often providing more functionality than the single-purpose counter-part. What Webmin feature do you think people ought to know about that doesn’t get talked about much?

I think the MySQL and PostgreSQL modules are the best examples of this, as they have pretty much all the functionality of phpMyAdmin and phpPgAdmin, yet phpMyAdmin is much better known as a MySQL management tool. In fact, it some areas Webmin can do more than phpMyAdmin, such as shutting down and starting up MySQL, and editing the /etc/my.cnf file.

What area of systems management do you find most interesting right now?

Virtualization, in particular using Xen. I’m really impressed with what it can do, and how many virtual systems you can host on a decent box. Solaris Zones are an impressive virtualization system as well, although they operate at a different level.

Other than your own software, what is your favorite product or online service for system administration tasks?

Definitely Amazon’s EC2 and S3 services. EC2 in particular is invaluable, as I can use it to create new virtual systems running a variety of Linux distributions for testing purposes. The alternative is to have a rack of machines of my own for testing, which would be far more expensive and a take up a lot more space.

EC2 is pretty good if you are looking to set up a webserver quickly, as you can provision a new instance in minutes using Amazon’s command-line tools, or an application like VM2. I know several startups that are using EC2 to host their web services, as it is cheaper and more flexible than renting or buying a real dedicated server at a colocation facility. And if you design your application right so that it can scale across multiple machines, you can easily bring up new EC2 instances.

Now if only they would take it out of beta!