Keep watch over your server system with Webmin
Log Files, System Monitoring, and Automatic Jobs
Even with logfiles, Webmin clearly distinguishes between its own stuff and the operating system in which it runs. The Webmin | Webmin Actions Log window is a search interface for Webmin's internal log. Use it whenever you need to figure out exactly what you did in all of Webmin or just in some of its modules.
Rotation of system logfiles – and definition of post-rotation commands for each of them – has its own panel in the System section. Monitoring system performance is split between Networking | Bandwidth Monitoring and Others | System and Server Status. In the latter window, you can activate tens of system monitors, and you can set how often they should run and to which email address they should send updates and warnings.
Speaking of automated actions, the most useful part of Webmin might be its interface to set up and control cron jobs – that is, automatic execution of specific commands or scripts at regular intervals. From the visual point of view, the form in System | Scheduled Cron Jobs might be outdated, but it makes it very, very easy to create cron jobs that run only when you want. You can even specify a non-recurring range of dates in which each job should be executed and define which users can have their own cron jobs.
Firewall and Servers
The most critical part of the Networking section is probably the configuration of your firewall. By default, Webmin includes two modules for firewall configuration, called FirewallD and Linux Firewall. Which one is more appropriate depends on which distribution you are running. Luckily, Webmin is smart enough to advise you, in most cases, which you should use.
Out of the box, Webmin knows how to configure the servers corresponding to the essential services of any Linux system: remote access via SSH; websites with Apache; databases with MySQL; and email with Postfix, Procmail, and SpamAssassin. Many more servers, from DNS to DHCP, have separate modules that you can activate with a few clicks.
On one hand, this part of Webmin is the least useful: This is not Webmin's fault, it's just the nature of the beast. Regardless of which flavor of Linux you use, any configuration interface for services like running websites or email can only do so much for its users. Webmin has many practical forms that help a lot – and save lots of time – to set each variable of those servers; however, it's still up to you to know what those variables mean.
Beyond the GUI: Advanced Webmin Usage
No software interface is really useful if you cannot customize at least part of it to your specific needs or occasionally do something that is not specifically listed in its menus. Webmin provides several functions that make these things possible even without hacking its source code.
To execute a command that you would otherwise have to enter at a shell prompt, click on Others | Command Shell and type the command. To do serious terminal work, choose Others | Text Login (Figure 4). This option opens a terminal inside your browser in which you can run all the commands and scripts you want inside a secure SSH session. If there's a command that you want to assign to a clickable button for frequent use, add it in the Others | Custom Commands page shown in Figures 5 and 6.
These features alone make Webmin flexible enough for most users, but there is more: If you want to save even more time, you can write Perl scripts that will use Webmin on your behalf, using the XML Remote Procedure Call protocol. To understand how this trick works, look at Listing 1, which shows the essential parts of one of the sample scripts provided by the Webmin developers [5]. This script connects to your Webmin with the credentials in the single line of a file called url.txt
(line 1), which has the following format:
Listing 1
Using Webmin from a Perl Script
https://USERNAME:PASSWORD@yourserver.com:10000/xmlrpc.cgi
Lines 2 to 6 create an object that connects to the specified Webmin instance. Using the cron::list_cron_jobs
method, lines 7 to 10 check whether a cron job that executes the command echo foo
as user root
already exists. If yes, it is deleted (remember, this is just an example). Otherwise (lines 17 to 25), the server object is told to connect to Webmin again to create the cron job with the specified parameters. Of course, in real life, the user
and command
terms specified in the script would be parameters passed to the script.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.