Contents

Downloading Webmin for your system

The latest version of Webmin can always be downloaded from http://www.webmin.com/. At the time of writing, the latest release was version 1.070 , but new versions come out frequently. However, all the instructions
below will use version 1.070 for the filenames. If you download a later release, the version number in all the filenames and paths will have changed.

Some Linux distributions such as Mandrake and Caldera include Webmin as standard, so it may already be installed on your system. However, the version that they include may not be the latest official version that is available for download. But if you are happy with the release that you already have, you can skip this chapter.

Other Linux distributions like Debian and Gentoo include Webmin as a package that can be downloaded and installed automatically. On Debian, the command apt-get install webmin will install the latest version available in the Debian APT repository. However, this can sometimes be a few versions behind the newest official release, so you may want to download from http://www.webmin.com/ instead. On Gentoo Linux, the command emerge webmin will install the latest version from the Gentoo Portage repository, which should be the same as the newest official release.

If you are upgrading from an older Webmin version, the process is exactly the same as installing for the first time. Any changes that you have made to the configuration of Webmin itself or to other servers like Apache or Sendmail will be left unharmed by the upgrade.

While Webmin supports a wide variety of Unix variants, it does not cover all of them. Because it deals with system configuration files that differ in location and format between different kinds of Unix operating system, it has been written to behave differently depending on the type of operating system that it is running on. To see a complete list of supported operating systems, visit the web page http://www.webmin.com/support.html. If your
operating system is not on the list, you cannot use Webmin.

Before downloading Webmin for installation on your system, you have to choose which package format to download it in. The available formats are:

RPM

If you are running Redhat, SuSE, Mandrake, Caldera, MSC or any other Linux distribution which supports the RPM packaging format, then the RPM package is your best choice.

tar.gz

The tar.gz packaged version of Webmin will work on any operating system, but is slightly harder to install than the RPM and Solaris packages.

Solaris package

If you are running Solaris on Sparc or x86, then this is the package format for you.

For instructions on installing your chosen package type, see the appropriate section below.

Installing the RPM package

On every page of the Webmin website is a link in the top-right corner for the RPM package. A link can also be found on the page http://www.webmin.com/download.html. Once you have downloaded it, you should have a file on your Linux system named something like webmin-1.1.070-1.noarch.rpm To install, run the following command as root:

rpm –U webmin-1.1.070-1.noarch.rpm

The RPM install can only fail if you do not have Perl installed, or if Webmin cannot identify your operating system. If that occurs and your Linux distribution is on the list of those supported, you should install the tar.gz version instead. Because all Linux distributions are slightly different, the Webmin install process has to positively identify the exact distribution and version that you are running, such as Redhat 7.3. This can fail if one of the files that contain the distribution name (such as /etc/issue) has been modified.

Assuming the RPM install completes successfully, you will be able to login to Webmin immediately. Open a web browser, and go to the URL http://localhost:10000/ if you are running the browser on the same Linux system that Webmin was installed on, or http://_your-systems-hostname_:10000/ if the browser is being run on another PC. Either way, a web form will appear prompting for a username and password as shown in Figure 2-1.

You should be able to login as root, using the same password as the root Unix user on your Linux system. If the password is changed using the command-line passwd command or the Users and Groups module, your Webmin password will change too.

Figure 2-1 The Webmin login page

If the OpenSSL library and the Net::SSLeay Perl module have already been installed on your system, Webmin will automatically start in SSL mode. This means that you should use a URL starting with https:// instead of http:// to connect to it. Attempting to connecting with the non-SSL URL will only bring up a page with a link to the https:// URL on it, that you should follow to login.

Installing the tar.gz package

On every page of the Webmin website is a link in the top-right corner
for the tar.gz package. A link can also be found on the page http://www.webmin.com/download.html.
Once you have downloaded it, you should have a file on your system
named something like webmin-1.1.070.tar.gz . To install the package, follow these steps:

Login to your system as root

Choose a directory under which you want Webmin installed. This is usually /usr/local, but can be /opt or any other location that you prefer. The instructions below will use /usr/local for simplicity.

Copy the webmin-1.1.070.tar.gz file to the /usr/local directory.

Run the following commands to uncompress and extract the tar.gz file and run the setup script : cd /usr/local gunzip webmin-1.1.070.tar.gz tar xf webmin-1.1.070.tar cd webmin-1.1.070 ./setup.sh

After running the setup.sh script, you will be asked a series of questions that control the installation process. The questions and their meanings are:

Config file directory [/etc/webmin] The directory in which Webmin will store all of its own configuration files. It is best just to hit enter to accept the default of /etc/webmin. If this directory already exists from an older version of Webmin that you are upgrading from, this is the only question that will be asked.

Log file directory [/var/webmin] The directory in which Webmin's log and process ID files will be stored. Just hit enter to accept the default of /var/webmin for this one as well.

Full path to perl The location of the Perl executable on your system. If it is at /usr/bin/perl or /usr/local/bin/perl then you can just type enter to accept the default. Otherwise, you must enter the full path to the Perl iterpreter.

Operating system This question will only be asked if Webmin cannot automatically identify your operating system. You must enter the number next to one of the operating system names that appears in the list before the question.

Version Like the question above, this will only be asked if Webmin cannot identify your operating system. Again, you must enter the number next to one of the version numbers displayed.

Web server port (default 10000) The HTTP port on which Webmin listens. It is best to stick with the default, unless you are running some other network server on port 10000.

Login name (default admin) The username that you will use to login to Webmin with. admin is the traditional username, but anything can be used.

Login password The password that must be entered along with the username. You must enter this twice, to verify that you haven't accidentally made a mistake.

Use SSL (y/n) This question will only be asked if you have already installed the OpenSSL and Net::SSLeay libraries on your system, as explained in chapter 3. If you enter _y_, Webmin will use SSL right from the start. However, even if you enter _n_ you can still turn it on later.

Start Webmin at boot time (y/n) This question controls whether Webmin will be starting when your system boots up, which means that you do not have to re-start it yourself manually every time you reboot. If you want to have it started at boot, just enter _y_. If not, enter _n_.

After all the questions have been answered, the install process will finish and a message showing the URL that you can use to login will appear. You can now delete the old webmin-1.1.070.tar file if you no longer need it. However, do not delete the /usr/local/webmin-1.1.070 directory that was created when the tar file was extracted. This contains all the scripts that Webmin needs to run.

Now that the package has been installed, you can open a web browser, and go to the URL http://localhost:10000/ if you are running the browser on the same Linux system that Webmin was installed on, or http://_your-systems-hostname_:10000/ if the browser is being run on another PC. Either way, a web form will appear prompting for a username and password as shown in Figure 2-1. Login using the username and password that you chose before in response to the Login name and Login password questions.

If you answered yes to the SSL question, you should use a URL starting with https:// instead of http:// to connect. If Webmin detects a non-SSL connection when it is in SSL mode, it will display a page with a link to the correct URL.

Installing the Solaris package

The Solaris package version of Webmin is only available for download from http://www.webmin.com/download.html. Once you have downloaded it, you should have a file on your Solaris system named something like webmin-1.1.070-1.pkg.gz . To install, run the following commands as root:

gunzip webmin-1.1.070.pkg.gz pkgadd –d webmin-1.1.070.pkg.gz WSwebmin

The Solaris package can only fail if you already have Webmin installed, or if you do not have the Perl executable at /usr/local/bin/perl. If you have Perl installed somewhere else on your system, you should create a symbolic link from /usr/local/bin/perl to the real location.

Assuming the Solaris package install completes successfully, you will be able to login to Webmin immediately. Open a web browser, and go to the URL http://localhost:10000/ if you are running the browser on the same Linux system that Webmin was installed on, or http://_your-systems-hostname_:10000/ if the browser is being run on another PC. Either way, a web form will appear prompting for a username and password as shown in Figure 2-1.

You should be able to login as root, using the same password as the root Unix user on your Linux system. However, if you change the Unix root password in future the Webmin root user will not change. This is because the package install just copies the current password from the /etc/shadow file.

The Webmin user interface

Assuming the installation process and login were successful, your browser should show Webmin main menu with the Webmin category selected, as shown in Figure 2-2. You can switch to other categories by clicking on the icons along the top of the page, such as System, Servers or Others. Every module is a member of one category, and a table of icons for each module in the selected category will appear in the body of the page. To enter a module, just click on its icon.

Figure 2-2 Modules in the Webmin category

To logout of Webmin, just click on the Logout link that appears in the top-right corner of every page. To send some feedback to the author (that's me), click on the Feedback link that is next to the Logout button. To visit http://www.webmin.com/, click on the Webmin logo in the top-left corner of any page.

If you are using a different theme, the user interface will appear different to the screen shown in Figure 2-2. Some versions of Webmin that come with Linux distributions use a different theme by default, such as Mandrake and Caldera. However, the main menu will still show categories and modules, maybe using different size icons in a different on-screen layout. All the screens in this book were taken using the default theme, so you may want to switch to it now. See chapter 51 for instructions on how to change the current theme.

All Webmin modules have a common layout and user interface, in order to make navigation easier. When you click on a module icon from the main menu, the main page of the module will appear. For example, Figure 2-3 shows the main page of the Disk Quotas module.

Not done

Figure 2-3 “The Disk Quotas module main page”

At the top are the category icons that appear on every Webmin page, so that you can easily switch to another module. Below are links for Help, Module Config and Search Docs. Not every module
will display all of these links, but where they appear they have common purposes :

Help

Opens a pop-up window containing an overview of the module and options available on the main page.

Module Config

Displays a form containing configurable options for the current module. See Figure 2-4 for an example of the options available in the Disk Quotas module. Each module has its own set of options, but all use a similar interface for editing them. In most cases, for normal use of a module you will not need to change any of these configuration options.

Search Docs

Displays a list of Unix man pages, package documentation, HOWTO files and web sites related to the server or program that the module is configuring. This can be useful for finding out additional information about the underlying configuration files and commands that Webmin is using.

Not done

Figure 2-4 “The configuration page for the Disk Quotas module”

Other pages below the first in each module also have a common layout. Figure 2-5 shows a page from the Disk Quotas module as an example. Below the list of category icons is a link labeled Module Index, which will always return you to the module's main page, which can be found on almost every page of every module. Next to it is another Help link, which pops up a window displaying information on the current page. Not all pages have online help, so this link will not always appear. Finally, at the bottom of the page is a link whose label starts with Return to, which will take you back one level in the module's hierarchy of pages.

Not done

Figure 2-5 “An example page from the Disk Quotas module”

Uninstalling Webmin

If for some unimaginable reason you want to remove Webmin from your system, you can just login as root and run the command : /etc/webmin/uninstall.sh This command will ask if you are sure you want to uninstall, and if so will delete the Webmin scripts and configuration directories. This means that any configuration you have done to Webmin itself such as changing IP access control, switching theme or creating new Webmin users will be lost. However, there will be no harm done to the configuration of other servers such as Apache or Sendmail, even if they were done using Webmin.