The Webmin Configuration Module
The Webmin Configuration Module
The Webmin Configuration Module
Webmin Configuration
This page explains how Webmin can be used to configure itself, install new
modules or upgrade to a new version.
This module exists to allow Webmin itself to be configured, unlike most other
modules that are designed to configure some other server or service. It lets
you do things like change the port and Webmin uses, limit the client
addresses that can connect, change the theme and language that the user
interface uses and install new modules. This chapter explains how to use the
module to carry out these tasks.
When you click on the module's icon in the Webmin category, the menu of
icons shown in the image below will be displayed. Each of the icons can be
clicked on to display a configuration page or form on which some of the
Webmin settings can be changed.
Webmin usually listens for connections on port 10000 on all of your system's
IP addresses. You may need to change the port though, perhaps because a
firewall on your network only allows connections to web servers on the
standard ports of 80 and 443. Because port 10000 can be used by servers
run by any user, it may be possible for a malicious user on your system to
wait for Webmin to be shut down and then start his own fake Webmin server
on that part, which could capture the admin or root password. For this reason
you may want to use a port below 1024 (which only programs run as root can
listen on) instead. Changing the listening IP address can also be useful if your
system has multiple network interfaces and you want to only allow
connections on the interface connected to the internal LAN.
1. Click on the Port and Address icon on the module's main page.
2. To listen on only a specific interface address, select the second option
in the Listen on IP address field and enter an IP into the text box next
to it. This must be the address of one of your host's real or virtual
interfaces.
3. To change the port, enter a number into the Listen on port field.
4. Hit the Save button to use the new settings. Your browser will be re-
directed to the new port and address, and you may need to login again.
Setting up logging
Like most web servers, Webmin can be configured to create a lot file in the
standard CLF format the records every request it receives. As well, it also
creates a log of actions performed by users, such as the creation of a DNS
zone or the deletion of a Unix group. This actions log can even include the
details of every file changed and command run by each action, so that you
can see what Webmin is doing under the hood.
Many Webmin modules are capable of downloading files from other FTP,
HTTP and HTTPS servers. For example, the Software Packages module lets
you enter a URL to fetch and install a new package from. Normally Webmin
will connect directly to the host specified in the URL, but it can be configured
to use a proxy server instead. This may be necessary if your network does not
allow direct access to web and FTP sites, but instead forces clients to connect
through a proxy.
To specify HTTP and FTP proxy servers and the hosts for which they will be
used, follow these steps :
Webmin has several settings that control the color scheme of the user
interface (when using the Old Webmin Theme), what server host information
is displayed on each page, and if the sending of feedback is allowed. You can
change them by following these steps :
1. On the module's main page, click on the User Interface icon to bring
up the interface options form.
2. The first five fields let you choose the colors to be used for various
parts of the interface when using the old-style theme. For each you can
either select Default, or enter three hexadecimal numbers for the red,
green and blue components of a color. For example, FF 88 00 would be
a shade of orange. These options have no effect on the new default
theme though.
3. In some themes, the title at the top of every page is rendered as an
image. Because this can make the page slow to download, you can
force the use of plain HTML text titles instead by changing the Display
titles as text? field to Yes.
4. By default every page in Webmin shows your system's hostname and
operating system in the browser status bar. To have it shown elsewhere
or turn it off altogether, select one of the following options from the
Display login and hostname menu : *At bottom of browser *The
information is shown in the browser's status area, which is usually at
the bottom of the window. *In browser title *The information is added to
the title of each page, which usually appears in the browser window
title. *Above page heading *The information is shown above the title of
each page. *Nowhere *The hostname and operating system
information is not shown anywhere. If you are worried about un-trusted
users learning too much about your system, this is the option to
choose.
5. When using the default theme, every page in Webmin has a link in the
top-right corner for sending feedback to the developer. However, you
may want to configure it so that feedback is sent to the master system
administrator instead, so that other users can contact you. To do this,
enter your email address in the Send feedback to field and change the
Allow sending of feedback? field to Only to address above. The
sending of feedback can be completely prevented by selecting No in
the latter field instead.
6. Click on the Save button to activate the new user interface settings.
Once you have found a module that you like, it can be installed by following
these steps :
1. On the main page, click on the Webmin Modules icon. This will bring
to you to a page with forms for installing, cloning and deleting modules.
2. If you have already downloaded the module's .wbm file to the system
on which Webmin is running, select From local file and enter the full
path to the file into the text field next to it.
3. Alternately, if the module file is on the PC that your web browser is
running on, select From upload file and use the Browse button to find
the file on your computer.
4. If instead the module is on a web site somewhere, select From ftp or
http URL and enter the full URL into the text box next to this option.
5. Webmin will normally stop a module from being installed if any other
modules that it depends on are not available, or if it is written for a later
Webmin release. To prevent this, check the Ignore module
dependencies when installing box. However, this may allow the
installation of a module that will not work. It will not allow you to add
modules that do not support the server's operating system though.
6. To control who this new module will be granted to, select the Grant
access only to users and groups option and enter a list of Webmin
user and group names into the adjacent text box. By default only the
user that you are currently logged in as is listed. Alternately you can
give it to every user and group by choosing Grant access to all
Webmin users.
7. Hit the Install module from file button to download (if necessary) and
install the new module. If everything goes OK a page listing the
modules installed and the sizes of their directories will be displayed.
Webmin comes with a script called install-module.pl that can be found in the
installation root directory. If you have installed the RPM version, this will be
/usr/libexec/webmin - otherwise it will be wherever the tar.gz file was
extracted. This script can be used to install a module from the command line,
by passing the .wbt file to it as a parameter. It will be granted only to the root
or admin user if one exists, or the first account listed in the Webmin Users
module otherwise.
Any of the modules currently installed, including those that comes with
Webmin by default, can be deleted on the same page as well. Deleting the
default modules is not a good idea though, as they will be automatically re-
installed the next time you upgrade. Instead it is better to take away access
that you don't want to use with the Webmin Users module, as explained in
chapter 52. Not all modules can be deleted either, as some are depended
upon by other modules (such as Running Processes). Nor is it possible to
delete this module.
In some situations you may wish that you had the same Webmin module
installed twice, so that each could be configured individually. This can be
useful if for example you have two versions of Apache installed, perhaps one
for testing and one for production. The standard Apache module can only be
set up to manage one at a time, so it might appear the only want to configure
both servers would be to install Webmin twice.
The operating system and version detected at installation time determines the
default values for module configurations, as each flavor of Unix uses different
locations and formats for the various config files that Webmin manages.
However, changing your OS by following the steps above will not adjust any
of these configuration settings. Instead, it will just determine which ones are
used for modules installed in future. Usually this is not a problem, as most OS
upgrades will not change the locations of files and programs. However, some
modules may need to be manually configured after an upgrade - for example,
you may need to change the print system used by the Printer Administration
module if the old OS version used LPRng and the new version uses CUPS.
When you run a command like ls from the Unix shell, the PATH environment
variable determines the directories that your shell will search to find the actual
executable, such as /bin/ls. Webmin also uses the PATH variable to locate
commands that it runs when a full path is not specified, such as webalizer or
mysql. By default this list of directories is set to include all of the common
locations for programs on your operating system, but may be incorrect if you
have installed executables in some non-standard directory such as
/usr/local/samba/bin.
You can edit these paths and define your own environment variables that will
be passed to all programs run by Webmin by following these steps :
Any program run by Webmin also has access to several variables set by the
webserver itself and passed to the CGI programs that make up Webmin. For
example, REMOTE_USER contains the name of the logged-in user, and
REMOTE_HOST the client IP address. All HTTP headers are stored in upper-
case variables starting with HTTP_, so a program can find information about
the user's browser in the HTTP_USER_AGENT variable for example.
Many Webmin modules have been translated into different language, such as
German and Japanese. You can change the default language for all users by
following the steps below, of for just a single user in the Webmin Users
module. Not all of the translations are complete, so some messages and
labels will still appear in English though.
Many languages (such as Chinese, Japanese and Russian) use symbols not
found in the standard European alphabet. To display them a special font often
needs to be installed on the system running the browser that you use to
access Webmin. Some Linux distributions include these fonts by default, but
others do not and installing them can be rather complex.
Editing main menu settings
As well as general user interface settings that apply to all pages, there are
some that control the layout of only the main menu on which module icons are
displayed. They can be used to turn categorization off, control the display of
your system's hostname and OS and have users sent directly to a module by
default, among other things. These steps explain how to change the main
menu settings :
Webmin has the ability to upgrade itself when a new version comes out, either
from a file that you have already downloaded or from a package that it fetches
from www.webmin.com for you. Even though it is quite possible to upgrade
from the command line by installing the latest RPM or tar.gz package, doing it
from within this module is even easier and less prone to error.
Webmin can only be upgraded using the same type of package that it was
originally installed from. This means that if you used the tar.gz format
originally, an upgrade can only be done from another tar.gz file. Similarly, an
RPM install can only be upgraded from a newer RPM package. Of course,
when Webmin downloads the newest version for you it will always choose the
right package format.
Recent releases have the ability to check the GnuPG? digital signature on the
RPM and tar.gz packages to ensure that they are authentic. This can only be
done if you have the gpg command installed on your system, and when using
the tar.gz package only when upgrading directly from the Webmin site.
Signature checking protects you from installing a fake versions of Webmin
that is actually a Trojan horse or some other type of malicious program.
1. Click on the Upgrade Webmin icon on the module's main page. This
will take you to a page with forms for upgrading, installing updated
modules and setting up the automatic install of updates.
2. The Upgrade Webmin form is very similar to the form for installing
modules, explained in the Installing and deleting Webmin modules
section. Select either From local file if the new package is already on
your server system, From uploaded file if it is on the PC your web
browser is running on, or From ftp or http URL to have the package
downloaded from some URL. The easiest option is to choose Latest
version from www.webmin.com to have the appropriate package
downloaded automatically.
3. If Webmin on your system was installed from the tar.gz file, the Delete
old version's directory after upgrade? box can be checked to have
the old version removed after the new one is installed. Unless you want
to be able to revert to the old release, this option should be enabled to
save on disk space. It does not appear at all for RPM installs, as the
RPM package always installs in the same directory.
4. To have the GnuPG? signature on the package verified if possible, turn
on the Check GnuPG? signature on package? option. It is enabled
by default if the gpg program is installed on your system.
5. Hit the Upgrade Webmin button to begin the upgrade. A page showing
the download progress (if necessary) and output from the new version's
setup.sh script will be displayed. If you are already running a version
later than the one selected to install or on www.webmin.com, an error
message will be displayed instead.
The upgrade process will preserve all users and module configuration
settings, and should not even be noticeable by people currently accessing
your Webmin server. If you originally installed the program from the tar.gz
package and did not specify a target directory like /usr/local/webmin, the new
version will be installed in the directory 'next to' the old one. For example, if
Webmin 1.060 was in /usr/local/webmin-1.060 and you upgraded to version
1.070, it would be installed in /usr/local/webmin-1.070, and the old directory
deleted if the *Delete old version's directory after upgrade?* option was
checked.
Any modules that the new version includes but the old one does not will be
granted to the first user listed in the Webmin Users module, which will
typically be root or admin. You should check after the upgrade is complete to
ensure that they have not been given to an un-trusted user instead though, as
most modules by default can be used to subvert security on your system.
Updated versions of Webmin modules in the latest release are often made
available to fix bugs or security problems. Installing these updated modules is
always a good idea, as they may fix problems that you have been having or
patch security holes that could allow un-trusted users to gain root access on
your system. Updates are always designed to solve problems rather than
adding new features which may potentially have problems of their own.
Of course, if you are not having any trouble then you can just wait until the
next full release and install it instead. Each version will always include any
updates that were made available for previous versions of Webmin. Updates
are only created to solve problems in the latest version, so if you are running
an older version do not expect any more to be released for it.
Every Webmin module has a version number, which the update process uses
to keep track of which ones it has already downloaded and installed. A
message like Module cron is already up to date shown next to a potential
update indicates that it has already been installed. A message like *Update to
module cron is not related to this OS* means that the module does not
support your operating system, or that the problem that the update fixes does
not occur on your OS.
Instead of manually following the steps above every now and then, you can
configure Webmin to check for, report on and install new modules on
schedule. When needed updates are found, an email can be sent to you
listing the modules that should be or have been installed and the problems
that they fix. As well the email will include notification of the availability of a
new Webmin release, if there is one.
1. Click on the Update Webmin icon and scroll down to the final form on
the page, titled Update modules on schedule.
2. Check the Scheduled updating currently enabled box.
3. Unless you run your own repository, select Update from
www.webmin.com.
4. The Update modules at field specifies the time of day that the
scheduled update check is run. Typically you should enter something
like 3 to have updates done at 3 am, assuming that your system is
turned on at that time. The every field next to it sets the number of
days between checks. For example, if you enter 1 then updating will be
done only every third day. 1 or 2 days is usually a reasonable period.
5. If the Only show which modules would be updated option is
enabled, a reporting only showing which modules need updating will be
sent out on schedule. This can be useful if you want to be reminded of
new modules, but install them yourself to control which updates are
used.
6. The Install modules that are not currently installed option has
exactly the same meaning as in the Update modules now form, and
generally does not need to be enabled.
7. If Only report updates is checked, an email report will not be sent if no
needed updates are available and no new version of Webmin has been
released. This is usually what you want, as it cuts down on the number
of unnecessary email messages.
8. In the Email update report to field enter the address to which the
update report should be sent. If it is left empty automatic checking will
still be done, just not reported. Email is always sent by calling the
sendmail program, the path to which is taken from the Sendmail
Configuration module's configuration.
9. Hit the Save and Apply button to enable scheduled updating. A Cron
job (covered in chapter 10) will be created, which you can see in the
Schedule Cron Jobs module, but should not touch.
Configuring authentication
Webmin has several options that control how multiple failed login attempts are
handled, how users login and how Unix passwords are checked. The default
authentication method uses cookies, but if your browser cannot handle them
you may want to switch to basic HTTP authentication instead. The only
problem with this method is that there is no way to properly log out, as there is
no support for logging out in the HTTP protocol. However, it sometimes must
be used - for example, browsers on MacOS? X cannot load applets (such as
the ones in the File Manager and SSH/Telnet Login modules) from web
servers using cookie authentication.
Every Webmin module has a category that controls where it appears on the
module's main menu. You can create your own categories and move modules
from their default locations into your own or existing categories, which can be
useful if you don't like the default arrangement, or want to put everything into
one huge category.
A theme is an extension to Webmin (much like a module) that controls how its
interface appears. The currently active theme determines if and how the
categories at the top of each page are displayed, what page background is
used, what icons each module has, how titles appear and how each page
ends. By changing themes you can significantly change the look of Webmin
without effecting its functionality. Several themes are included by default, and
you can install more that have been written by other developers.
Like the language, you can set the theme for all logins in this module, or
override it for a specific user in the Webmin Users module. The steps to
change the theme for everyone are :
1. Click on the Webmin Themes icon on the module's main page. This
will take you to a page for changing themes, installing a new theme and
deleting existing ones.
2. Select the theme to use from the Current theme menu. Those included
as standard with Webmin are : *Old Webmin Theme *The very simple
theme that the first versions of Webmin used before theming was
added. If you find the default too slow, this may be a better alternative
as it uses less images. *Caldera Theme *An improved layout that uses
frames to place categories and module icons at the top, and actual
forms and pages down the bottom. *MSC.Linux Theme *The current
default Webmin theme. *MSC.Linux Mini Theme *A modified version of
the default theme, designed for use on small-screen devices such as
PDAs.
3. Hit the Change button to activate the chosen theme.
New themes developed by other people can also be added to Webmin, and
several are available for download from www.webmin.com/third.html.
The final thing that you can do on this page in delete one of the installed
themes. The Old Webmin Theme cannot be deleted as it is built into the
program, and the other standard themes should not be as they will be added
again if you upgrade to the next version.
Referrer checking
Fortunately, there is a solution - most browsers send the full URL of the page
that a link came from in their HTTP requests. By default, Webmin compares
the hostname in this URL with the one used to access the current page, and
displays a warning if they do not match. This blocks links from other web sites
to your Webmin server, except for those that do not specify a program, such
as http://localhost:10000/cron/, and are thus harmless.
Sometimes though you will want to allow such links, such as from an internal
Intranet webserver that you maintain and trust. For this reason Webmin can
be configured to allow links where the referrer is from a list of trusted hosts.
These steps explain how :
Webmin does not simply deny links from un-trusted sites. Instead, it displays
a warning and gives the user a chance to continue with the link. This warning
form contains a checkbox labeled *Don't show this warning in future*, which if
selected effectively changes the Referer checking enabled? field to No.
It is possible to set up certain Webmin modules so that they can only be used
to view information, or to execute harmless commands. For example, the
System and Server Status module's access control features can be set to give
a user read-only access, letting them see which monitors are up and which
are down. Or the Custom Commands module can be configured for some
user to let him only run commands that display information.
The anonymous access feature of this module lets you grant access to certain
modules to clients without them needing to login at all. Such clients will be
treated as a specified Webmin user, and thus have only the rights that you
grant to that user. However, they will never need to supply its username and
password when accessing allowed modules on your system. This can be
useful for making certain information (such as the server status display)
available to everyone on your network, without needing to tell them a
username and password. However, it should be used with extreme care, as
granting anonymous access as a powerful user could compromise your entire
system.
If a user who has already logged visits a module that has been allowed
anonymous access with the steps above, Webmin will still identify him
correctly as the logged-in user.
Turning on SSL
The SSL Encryption page in this module can be used to turn on or off SSL
mode or to generate another new key, all of which is explained in
SecuringWebmin.
As the WebminUsers page explains, the Webmin Users module can be used
to request a client-side SSL certificate for a user. However, before this is
possible you must set up your system as a certificate authority, or CA. An
authority is basically just an SSL certificate that can be used to sign other
newly issued client certificates, and to verify that those supplied by clients
come from this CA.
Because client SSL authentication can only be used in SSL mode, Webmin
must be running in that mode and thus have the openssl command installed
before you can precede. Once these requirements have been satisfied, follow
these steps to set up a CA :