Article
Use Webmin for Linux Administration, Parts 1 and 2
Administering Linux and Unix-based servers does not need to be the scourge of your work day. With a handy tool called Webmin as part of your arsenal, you can regain complete control of your servers via the Web browser.
This is a two-part series. In this, Part 1, we'll review the scope of Webmin and the way in which it can assist the Web developer in server administration for domain management. In Part 2, which starts here, we'll look at several additional features of Webmin for server maintenance, and some techniques for its use.
Skip straight to Part 2, or continue reading Part 1...
Webmin, developed by Jamie Cameron, acts as a comprehensive interface to the underlying applications on servers, including support for configuring applications like ftp, ssh, mail, Web, databases and more. Differing from other control panels, the core Webmin interface is intended for system administrators with root access to their servers, and includes a user-based package to enable your users (or clients) to access their own domains, email, and more, within a limited scope. Webmin supports running under SSL.
The application runs on its own mini-Web server so as to be available even when your primary Web server software is not running (i.e. Apache, etc.), and is powered by a number of Perl-based applications that directly interface with your system configuration files. According to Webmin, the entire solution is built on Perl 5 and uses no non-standard Perl modules.
The beauty of open source in practice is exemplified within Webmin's module system. While the core system was built by Mr. Cameron, numerous individuals have contributed patches, non-English translations, and vast array of third-party modules, in addition to the base set included with Webmin. These extra modules can be found at http://webmin.thirdpartymodules.com.
Getting Started
To get started, drop by www.webmin.com and download the latest release. You can use rpms for Red Hat and related systems that support binary installations, or you can build Webmin from source. Webmin supports a large number of Unix variants, including OS X. To install the rpm, simply open a terminal session, and type in rpm –ivh webmin* (as root user) in the directory in which Webmin was downloaded.
Installation From Source
If you're working from the source file, select tar.gz from the download link on the Webmin home page. Once this has downloaded, open a Terminal session and run the following:
Shell prompt # gunzip webmin-1.130.tar.gz
Shell prompt # tar -xvf webmin-1.130.tar
Shell prompt # cd webmin-1.130
You can customize the installation process by adding options to the setup.sh script included in this directory, then selecting your settings as the script executes. To select a specific directory (I would recommend something under /usr or /var), use:
Shell prompt /webmin-1.130]# ./setup.sh /var/webmin
You will be asked to choose the following settings (you can accept the defaults presented or enter changes for each option):
- Webmin configuration directory
- The location at which Webmin will store logs
- Path to Perl
- Your server OS (Webmin does a good job of auto-detecting and will ask)
- The port that Webmin will run on (defaults to 10000)
- The user name and password to login to Webmin
- Your server's hostname -- again, Webmin tries to detect this
- Use SSL -- should only prompt if Perl's SSL libraries are installed (this author has not run Webmin under SSL)
- Whether you want Webmin to start with system boot (highly recommended)
Logging In to Webmin
Once Webmin's installed, point your browser to the server on which Webmin is now running. This can be either a local or remote server, of course. Simply supply the hostname and port you selected, i.e. http://hostname:10000. You will be prompted for the login that you just set up.
Once you're in, you'll see Webmin's welcome screen and application control menus. This first set of options allows you to set up access and security rights within Webmin. The Webmin configuration option gives you comprehensive, granular control over how Webmin will operate in your environment.
Webmin includes a built-in module that checks for updates to the system (from the Webmin site or one of your choice), and automatically carries out these installs when executed.
Usermin
Also on this welcome screen, you'll see an option called Usermin. If you elect to initialize Usermin, your users (clients) will have browser-based access to their account on the server. If Usermin is not installed, Webmin will prompt you, and install it for you. It'll set the port that's to be accessed by the Web browser to 20000 (i.e. http://hostname:20000).
You determine the level of access you'll provide, and this includes enabling and/or disabling the modules available to your users, such as:
- Access to a simple Webmail interface, and access to set up Fetchmail
- Modifying Login options, including passwords, command shell, login scripts and more
- Application access to a limited view of MySQL, Apache htaccess files, GnuPG and the ability to upload and download from the user's account directory
- Miscellaneous options such as a Java-based File Manager in the browser, access to help docs on the system, and access to cron under the visitor's username.
Also under the Webmin screen, you'll find the ability to link to multiple servers running Webmin on your network. In conjunction with clustering tools, this facility enables you to distribute settings across multiple servers from one interface.
Accessing Your System
The power of Webmin is evident when you access the System tab, as seen below.

You have control over what daemons start and stop during system startup and shutdown, access to all run levels, and the ability to add custom applications to startup and shutdown.
In addition, you have access to controls for password resets for any user on the system, cron jobs, a graphical view of running processes and the facilities to back up the file system. For those on RPM-based systems, access to Software Packages will be a time saver. Here, you can perform searches for software installed on the system, search for rpms to install on the system, and even set up the Red Hat Network to implement critical updates on a schedule.
System logs can be configured and viewed in this portion of Webmin. They provide a graphical view of the grep and tail commands used in the Terminal to view logs such as those for boot, mail and users.
Finally, the ability to add and remove users and groups, including bulk imports of multiple users, should be a great timesaver. We'll cover this in the example domain setup later in this article.
Blane is a writer and researcher focusing on Apple and Open Source technologies. Prior to this, he helped found a commercial software and consulting venture, and worked in the financial services sector as a director of technology and in varying technical roles. Blane maintains