From Webmin Documentation
(Redirected from Webmin)
Jump to: navigation, search

What Webmin is, why it was written, and what you can expect from this documentation.

What is Webmin?

Webmin is a program that simplifies the process of managing a Linux or Unix system. Normally you need to manually edit configuration files and run commands to create accounts, set up a web server or manage email forwarding. Webmin lets you perform these tasks through an easy to use web interface, and automatically updates all of the required configuration files for you. This makes the job of administering your system much easier.

System Information.png

Some of the things that you can do with Webmin are :

These are just a few of the available functions. Webmin lets you configure almost all of the common services and popular servers on Unix systems, all using a simple web interface. It protects you from the syntax errors and other mistakes that are often made when editing configuration files directly, and warns you before potentially dangerous actions.

Because Webmin is accessed though a web browser, you can login to it from any system that is connected to yours through a network. There is absolutely no difference between running it locally and running it remotely, and it is much easier to use over the network than other graphical configuration programs.

Webmin has what is known as a modular design. This means that each of its functions is contained in a module that can generally be installed or removed independently from the rest of the program. Each module is responsible for managing some service or server, such as Unix users, the Apache Webserver or Software Packages.

If you have been manually configuring your system up till now, any existing settings will be recognized by Webmin. It always reads the standard configuration files on your system and updates them directly, instead of using its own separate database. This means that you can freely mix Webmin, manual configuration and other programs or scripts that work in the same way.

Even though this book is written for Linux users, Webmin can be used on many other flavors of Unix as well, such as Solaris, FreeBSD and HP/UX. One of its biggest strengths is its understanding of the differences between all these operating systems, and the way that it can adjust its user interface and behavior to fit your OS. This means that it can often hide the underlying differences between each Unix variant and present a similar or identical interface no matter which one you are using.

Webmin on its own is not particularly useful though – it is only a configuration tool, and so you must have programs installed for it to configure. For example, the Apache module requires that the actual Apache webserver be installed. Fortunately, all of the services and servers that it manages are either included with most Linux distributions as standard, or can be freely downloaded and installed.

Who should use Webmin?

Webmin was written for use by people who have some Linux experience, but are not familiar with the intricacies of system administration. Even though it makes the process of creating Unix users or managing the Squid Proxy Server easy, you must first have some idea of what a Unix account is and what Squid does. The average Webmin user is probably someone running it on their Linux system at home or on a company network.

The program assumes that you are familiar with basic TCP/IP networking concepts, such as IP addresses, DNS servers and hostnames. It also assumes that the user understands the layout of the Unix filesystem, what users and groups are, and where user files are located. If you use Webmin to manage some server like Apache or Sendmail, you should first have some idea of what they can do and what kind of configuration you want done.

Webmin itself runs with full Unix root privileges, which means that it can edit any file and run any command on your system. This means that it is quite possible to delete all of the files on your system or make it un-bootable if you make a mistake when using the program, especially if you are configuring something that you don't understand. Even though Webmin will usually warn you before performing some potentially dangerous action, there is still plenty of scope for causing damage.

Even though it can be used on a system with no connection to the Internet, Webmin does benefit if your Linux system is on a network. It can download new software packages, Perl modules or even new versions of Webmin for you if connected. A permanent high-speed connections is best, but even dial-up is good enough for most purposes.

Because Webmin runs with root privileges, you must be able to login to your system as root to install and start it. This means that it cannot be used on a system on which you have only a normal Unix account, such as a virtual web server that is shared with other people. You might be able to get your system administrator to install and configure it for you though.

If you are already an experienced Unix system administrator, Webmin may not seem to be the tool for you because using it is generally slower than directly editing configuration files and running commands. However, even the experts can benefit from its automatic syntax checking and the actions that it can perform automatically. It is also possible to give different people different levels of access to Webmin, so that an experienced administrator can use it to safely delegate responsibility to less-skilled subordinates. For example, you might want someone to be only able to manage the BIND DNS server and nothing else, while giving yourself full access to the system and all of Webmin's functions.

How and why was it developed?

Webmin was written by me, Jamie Cameron, the author of this book. I started it back in 1997, and released the first version (number 0.1) in October of that year. Since then its user interface, features and appearance have changed dramatically, and almost all of the code has been re-written. However, the basic concept of a web-based administration tool has been the same since that very first release.

I started writing it when I was the administrator for a system running a DNS server, and was having to spend a lot of time updating the server's configuration files to add new host records requested by users. Giving them the root password was not an option – they did not have the experience to properly edit the zone files and re-start the server. The solution was a simple web interface that would display existing DNS records and allow them to be edited, created and deleted. Users could then be safely given access to this interface to make the changes that they needed.

DNS management was just the start though – once I saw the possibilities for simplifying the configuration of a Unix system though a web interface, I started adding other features to the program and putting them into modules. Next came modules for Unix users, Samba, mounting filesystems, NFS and Cron jobs. I thought up the name Webmin, made it available for anyone to download and announced it on a few mailing lists. The initial feedback was good, so I kept on writing.

Over the years the program has gone through three different user interfaces, reached 76 modules, added support for non-English languages, advanced access control, lots more operating systems and many other features. The Linux distribution companies Caldera and MSC.Linux have supported the project financially, and many users have made contributions of code patches, modules, translations and suggestions. As well as the standard modules, over 100 have been written by other people and can be added to Webmin on your system.

What is this book about?

This book explains how to install Webmin, how to use almost all of its modules, and how to write your own. Not all of the 76 standard modules are covered, as some are not very useful to the average administrator. The book focuses on the standard modules that come with the Webmin package, not those written by other people.

Although this book is written primarily for Linux users, the program behaves almost identically on other operating systems. As well, each chapter lists any differences between Linux and other Unix variants in their "Other operating systems" sections. This means that it is still very useful if you are running Webmin on FreeBSD, Solaris, MacOS X or some other variety of Unix.

The book is broken up into parts, each of which contains several related chapters. They are:

  • Introduction The chapters in this part provide basic information about what Webmin does, how to install it and how to make it more secure.
  • Webmin These chapters cover the modules that Webmin uses to configure itself.
  • System These chapters cover modules the configure Unix system services, such a filesystems, users and groups and printing.
  • Server The chapters within this part cover the configuration of servers that run on a Unix system, such as Apache, Sendmail and Squid.
  • Others
  • Networking
  • Hardware
  • Cluster This part's chapters are all about the Webmin modules that can be used to configure multiple systems from a single master server.
  • Developer's Guide The chapters in this final part explain how to write your own modules and themes.

Each chapter in the book covers the use of Webmin for managing some service or server, such as NFS exports, Sendmail or the ProFTPD FTP server. Most chapters only discuss a single module, but some cover two or three that have similar or related purposes. Each chapter is pretty much self contained, so there is no need to read though the entire book in sequence if you just want to find out how to configure one server. However, chapters 2, 3 and possibly 52 should be read first, as they explain how to install Webmin, how to secure it and how to limit what other users can do with a module, respectively.

Each chapter is broken up into sections, and most sections explain how to perform some specific task. A section will generally contain an introduction to the task explaining why you might want to do it, followed by a list of steps to follow in the Webmin user interface to carry it out. At the start of each chapter are sections that introduce the server being configured and the concepts behind it, and list the underlying configuration files that get modified when you use the module covered in that chapter.

Chapters 55 to 60 cover the development of your own Webmin modules and themes, and so have a different style. The average user does not need to read them, but if you have an idea for a module that is not currently available, they provide all the information that you need to implement it.

Who should read it?

This book should be read by anyone wanting to user Webmin to manage their Linux or Unix system. It was written for readers with a basic knowledge of Unix commands and concepts, people who have installed Linux and have used it for a while.

Each chapter starts with an introduction to the service being configured, so that readers have some idea of what the DNS protocol is for or how a firewall works for example. Even so, a complete novice should not try to set up some server until he understands how it works and what he wants it to do. The best way to learn is to use the service on some other system as a user. For example, if you have used a proxy server before on some other network, then you will have the background knowledge needed to use this book to set up the Squid proxy on your own system.

The development chapters on the other hand are written for someone who already understands how to write Perl scripts and CGI programs on a Unix system. This means that they are more complex than the rest of the book, and assume a knowledge of programming and manual system administration. However, they can be skipped if you just want to learn how to use Webmin, rather than how to extend it.

Conventions used in this book

The following special text styles are used in this book:

Used for text that appears in Webmin itself, such as error messages, icon names, buttons and field labels.
Fixed width
This style is used for the names of shell commands, Unix users, directories and files. Also used for text in configuration files, program code and API functions.
Used to indicate example input entered by the user into Webmin, or example commands or directories. Also used in the API chapter for the names of parameters to functions.

Thanks to

This book could not have been written without the support of Jill Harry and the others at Prentice Hall, Bob Kern for suggesting the idea, my wife Foong Ching for her constant support, and all the members of the Webmin mailing list for their ideas and suggestions over the years.