Book Image

Webmin Administrator's Cookbook

By : Michal Karzynski
Book Image

Webmin Administrator's Cookbook

By: Michal Karzynski

Overview of this book

Table of Contents (19 chapters)
Webmin Administrator's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Monitoring what Webmin is doing


One useful feature of Webmin is the fact that it keeps a log of every action it performs. It's sometimes useful to refer to this history to check how users have changed your system's configuration through Webmin's interface.

Getting ready

In order to take full advantage of Webmin's logging facility, you should enable the monitoring of file changes made though Webmin. This allows you to roll back the changes later.

In order to enable this function, go to Webmin | Webmin Configuration | Logging and set Yes as the answer to these two questions: Log changes made to files by each action? and Record all modified files before actions, for rollbacks?

How to do it...

To monitor what Webmin is doing, perform the following steps:

  1. To access Webmin's log, go to Webmin | Webmin Actions Log.

  2. Select filters to narrow your search down to log entries made today only and click Search. You will see a table listing all actions taken today through Webmin.

  3. Click on one of the actions to see a complete description of the action. This screen will inform you which user performed the action at what time, logged in from which IP, and which Webmin script was used.

  4. Add an annotation to the action by writing text to the Log entry annotation field and clicking Save. You will come across something like this:

  5. View all actions performed in this user session by clicking the link labeled Session ID. The annotated action will be visible in the list, marked with a star.

How it works...

Webmin records all actions performed by users to the log file /var/webmin/webmin.log. User annotations are stored in the /var/webmin/annotations directory. If monitoring of file changes is enabled, each change is recorded in the /var/webmin/diffs directory. Please note that these directories could potentially grow quite large over time on a busy system.

The Webmin Actions Log interface allows you to search these log files, display them, and use them to revert file changes.

There's more...

If you enabled monitoring of file changes as described in the Getting ready section of this recipe, you can use Webmin to revert the changes.

Rolling back file changes

As an exercise, go to Webmin | Webmin Configuration | User Interface and set the page background to a light blue color with the RGB hex value of C9DFFF. Go back to Webmin | Webmin Actions Log, and then find your action and view its details. In the section Files changed and commands run, you will see that a change to the file /etc/webmin/config was recorded, as shown in the following screenshot:

Tick the checkbox next to the file change and click the Roll Back Selected Files button. Confirm the rollback and go back to the Action Details page. Notice that the background color changes back to white.

See also

  • For more ways to monitor what your system is doing, take a look at Chapter 5, Monitoring Your System