Managing the server via the web interface using webmin in Ubuntu Server. Linux Administration

Using the “Terminal” is not always convenient even for professionals. Therefore, today graphical interfaces are increasingly used - even for those tasks where the use of text commands leads to faster results. A separate topic is the installation of Webmin Ubuntu - this is the ability to use a graphical web interface to manage the server.

Installing Webmin is necessary to work in graphical interfaces instead of the terminal.

Why is this so relevant? Among technical specialists, the speed of system operation is highly valued. Working with solutions that would slow down the server is unacceptable. Especially if the available resources are not so great. This is why complexes such as Webmin are especially valuable. Thanks to them, you can access server resources anywhere you have a computer, Internet access and a browser for work.

Webmin is a web interface that is designed for managing servers based on Unix-based systems. It is one of the simplest and most convenient solutions for solving problems of this kind. Here are its advantages:

  1. Helps save time on server management.
  2. Allows you to configure networks, as well as firewalls for them.
  3. Supports data backup.
  4. Allows you to fine-tune the OS.
  5. And has many other useful features.

Technically, Webmin consists of a simple web server, as well as numerous scripts that make working with it flexible and fast. Files with program settings can be changed either manually or using the “Webmin Configuration” block in the graphical interface.

If you want to install Webmin for Ubuntu for commercial use, you can do this completely free of charge. The program is distributed under a BSD license.

Let's move on to installation

First you need to make changes to the “sources.list” file:

"sudo nano /etc/apt/sources.list"

At the end of the file you need to insert the following lines:

"deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib"

"wget ​​http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc"

Done? Now update the list of data sources to load:

"sudo apt-get update"

Now on Ubuntu Server, installing Webmin becomes a matter of two seconds. Run the command:

"sudo apt-get install webmin"

Launch

To launch Webmin, you need to enter “https://(domain name or server IP):10000” in the address bar of your browser. All that remains is to enter your login and password when logging into the server. This must be done with administrator rights. All!

Finally

One of the challenges when moving from administering a Windows environment to administering a Linux environment is learning the new tools at your disposal. As an administrator, you want to learn every detail of the operating system to get the most out of it. However, while you are studying, you need the current work to be completed on time. To increase your productivity on Linux, let's install a program called Webmin.

"Webmin is a web-based administration interface for Unix. With it you can configure Accounts users, Apache, DNS, file server, etc., using any browser that supports tables and forms (and Java for the file manager module). Webmin consists of a simple web server and a set of CGI programs that directly update system files, such as /etc/inetd.conf and /etc/passwd. The web server and all CGI programs are written in Perl version 5 and do not use non-standard Perl modules."


Webmin works on virtually all *nix platforms, including Linux, AIX, HPUX, Solaris, OS X and others. It provides a web interface to many administrative tasks in Linux. It can run on any graphical browser, both locally and remotely. In order to avoid information leakage, Webmin can be additionally protected using SSL. While you're learning Linux, Webmin will save you a huge amount of time. Webmin can also help with boring and tedious tasks that you haven't automated yet.

Webmin is easily extensible. The author provides a development guide, and a number of third-party modules are also available. You can also develop your own custom modules, so Webmin can always be tailored to your needs.

Installing Webmin

The first step in working with Webmin is to install it. Webmin is included in several distributions, but it is easy to download from the Webmin website.

The correct installation method depends on the distribution you are using. If you are using Red Hat Linux or one of the UnitedLinux distributions (SuSE, Turbo, Connectiva, or Caldera), then you will need to download the RPM package. If you are using another distribution, you will need to refer to your distribution's documentation and Webmin installation instructions to determine the best method for you.

Let's look at installation using RPM.

First you need to check if Webmin is installed on your system. In a text terminal, type the following:

If Webmin is installed, you will see the version number:

If not, a message indicating that Webmin is not installed:

package webmin is not installed

Even if Webmin is already installed, it is most likely an older version than the one available for download. In this case, you can update or reinstall the program using the following command:

rpm -Uvh webmin-1.090-1.noarch.rpm

Updating in verbose mode occurs with a progress bar displayed using # signs.

Once Webmin is installed, it starts automatically. However, Webmin is installed with SSL support disabled. SSL requires the installation of a Perl module called Net::SSLeay. Until it is installed, the only safe way to use Webmin is to run it locally. Using Webmin

Connect to Webmin through your favorite web browser. Two modules - the file manager and the telnet/ssh client - are implemented as applets and require the Java Runtime Environment to be installed in your browser. These modules are convenient, but not critical. There are no special requirements for all other modules.

To use Webmin, connect your browser to port 10000 on your system. If you are using a browser on your local system, you should use http://localhost.localdomain:10000/. This link will take you to the Webmin login page.

Webmin users are separate from operating system users. This allows you to set up users for administration using Webmin outside of the standard Unix identity scheme. However, if you have users on your system that you want to allow to use Webmin, you can add them to the Webmin user list and Webmin will authorize them through standard Unix mechanisms rather than through an internal identity scheme. Access to various Webmin modules can be configured for each user. For example, Helpdesk employees will only need access to password management, while all other employees may have access to all modules.

The root user is created automatically during the installation process with the root system password. Webmin tracks user actions based on their login, so in a system that is administered by several people, it is better to create an administrator group with root rights and create users for everyone who works in the system. Your first login must be as root.

Webmin Sections

The first page you will see is the Webmin Configuration Section. Here you can configure Webmin users, modules and view activity logs (logs). The top row of icons allows you to switch between different sections of Webmin. All modules are customizable, you can rearrange them according to your needs.

The System section is associated with general operating system settings. Here you can configure file systems, users, groups, and system boot behavior. You can manage the services running on the system and control whether they are started automatically by the Bootup and Shutdown icons. These services are configured in the Servers section. Of particular interest is the "Software Packages" utility. It allows you to easily view the packages installed on your system, and also provides interfaces to the distribution's update repository and to rpmfind.net, a public RPM repository on the Internet.

The Servers section contains configuration modules for various services that can be launched on your system. Utilities for configuring BIND and DHCP are very convenient. It is also very easy to use the utility to configure Samba - file and print servers for Windows and other clients. Webmin will also take the hassle out of setting up Sendmail's SMTP server, which is notorious for having a complex configuration file.

The Networking section allows you to configure network equipment, as well as a number of complex network management functions, such as firewalling (internetwork). All utilities work with standard configuration files, so everything you do in Webmin will appear on the command line.

The Hardware section is intended for configuring physical devices, mainly printers and storage devices. The Logical Volume Management (LVM) utility is especially interesting because it allows you to visually manage dynamic volumes on your Linux system.

The Cluster section contains utilities that you can use if you are clustering your system. In this context, a cluster is a set of related systems for which it is necessary to synchronize their settings. Systems can sync users, groups, packages, and more while tracking system failures. These utilities will allow you to configure powerful, fault-tolerant systems, as well as systems for which synchronization is important. Clustering is a fairly complex topic and may require installation of packages that are not included in your distribution.

The Others section contains a variety of utilities that you may find useful. "SSH/Telnet Login" and "File Manager" are implemented as applets and cannot be launched unless the browser has the JRE installed. The "Perl Modules" utility is useful for maintaining Perl modules, and allows you to connect directly to CPAN in . "File Manager" provides access to file system server with an Explorer-like interface and allows you to move and copy files without moving them through your workstation's memory (if you're working remotely). "SSH/Telnet Login" is a utility that allows you to access the console of a remote machine through your browser.

Summary

Webmin is a web application written in Perl for administration. Webmin is extensible and available besides Linux and for other *nix-like systems operating systems. Once Webmin is installed, it can be accessed via a special port (usually 10000), either locally or by a remote browser. It provides a point-and-click interface to a variety of administrative tasks in Linux, including user management, network firewall management, and network device configuration.

Webmin is free (both to install and use) and is great for managing a running Linux environment while you are switching from graphical Windows utilities. Webmin modules are front end to console utilities, so the configuration process is the same and administration can be safely performed by both sets of utilities.

Leave your comment!

There are many web server control panels, both specialized for hosting and general purpose. Today I will install one of these panels - Webmin on a CentOS 7 server. In my opinion, this is one of the most popular tools remote control server via browser.

If you have a desire to learn how to work with Mikrotik routers and become a specialist in this field, I recommend following a program based on information from the official course MikroTik Certified Network Associate. The course is worthwhile, read the link for all the details. There are free courses.

Webmin is a web panel for administering a Unix server. It is cross-platform and can be installed on various Unix distributions. I described one of its uses a long time ago in an article about it on freebsd. Using webmin you can perform almost all popular administrative actions on the server, such as:

  • Set up network connections
  • Add users
  • Mount partitions
  • Set up firewall
  • Shut down or restart the server
  • Update packages

and much more. There are modules for various software that can be controlled via webmin. For example, Samba, or web server, mysql server and many other packages. The list of modules is extensive; you can see the list of third-party custom modules on the official website, or in the panel itself after installation the list of official modules. Through webmin you can access the server console, upload or download files from the server. Sometimes this is convenient.

I myself almost never use this panel, there is no need, I’m used to configuring everything in the console. But I know people who actively administrated servers using webmin. These were not very advanced administrators in Linux, but nevertheless, this panel allowed them to normally manage the server without the proper knowledge and skills.

I almost always use webmin on mail servers. It’s convenient for me to analyze and search for something in huge email logs using the log viewer module. I haven’t come across anything simpler and more convenient. For example, you have a daily log of 100-300 megabytes, dozens of events are recorded in it every second. You have a letter id. You can enter the email id in the search bar and see all the log lines in which it appears. It is very comfortable. A regular search is not enough in such a situation. You can, of course, grab the output of cat, or come up with something else, but this is less convenient. Especially if you need to compare values ​​from different log files. You just open different logs in two browser windows and analyze them.

Let's start installing Webmin on a server running CentOS 7. The process is described on the official website in the corresponding section. There is nothing complicated. You need to add the webmin repository, and then install the package itself and dependencies.

Add a repository:

# mcedit /etc/yum.repos.d/webmin.repo name=Webmin Distribution Neutral #baseurl=http://download.webmin.com/download/yum mirrorlist=http://download.webmin.com/download/yum /mirrorlist enabled=1

Import the GPG key:

# rpm --import http://www.webmin.com/jcameron-key.asc

Install Webmin:

# yum install -y webmin

Once installed, it will launch automatically. All we have to do is add it to startup:

# chkconfig webmin on

We go to the webmin web interface using the link https://192.168.56.10:10000 , where 192.168.56.10 is the ip address of the server. Be sure to specify the https protocol, you won’t be able to log in without it. Enter your username and password root. The webmin main page opens:

I won’t describe all the possibilities; you can browse the menu on the left yourself and see what can be configured via webmin. I would like to draw your attention to several important points. There is an opinion that webmin is not secure and the server can be hacked through it. I don’t know how justified these fears are, but just in case, it’s better to limit access to the server.

If you log in from static addresses, then limit access only to these addresses. This is done right there, in the next setting IP Access Control. I recommend this setting. Personally, I would not open the world of webmin unless absolutely necessary.

If you want to see a panel with Russian language, then there is no problem. You can select it in the section Language. The translation is generally fine, everything is clear. But it’s better, of course, to get used to English, without it there’s nowhere in system administration. But if you don’t understand it, you can also use Russian. In the end, webmin is most useful to those who do not understand servers, but need to administrate something. After changing the language, you need to forcefully refresh the browser page so that the entire interface becomes Russian.

That’s all, you can figure out the rest of the features and settings yourself; there’s nothing complicated about Webmin.

Online course Linux Security

If you want to understand in more detail the processes of setting up and ensuring the security of local and network infrastructure built on the Linux OS, I recommend that you get acquainted with online course "Linux Security" in OTUS. The training lasts 3 months, after which successful course graduates will be able to undergo interviews with partners. The course program is developed as a series of practical workshops and is aimed at trained students who already have knowledge and experience in Linux administration. What you'll learn:
  • Apply the best global practices and information security standards (Debian, RedHat, MitRE);
  • Use tools to detect and exploit vulnerabilities in the Linux OS;
  • Install and configure network attack detection and prevention systems;
  • Work with monitoring and containerization systems based on Docker;
Test yourself on the entrance test and see the program for more details.

It will be interesting to know how you can get convenient access using webmin in ubuntu server. The best tool for managing Unix systems via a web interface.

Using webmin, you can not only conveniently view logs, make changes to the configuration of installed services, but also install packages, remove them, update the system, etc. Even access the terminal!

Webmin is a ready-made web server with a whole bunch of scripts. All the delights of its use can be experienced after installation.

Installing Webmin

First of all, you need to add the webmin repositories to the /etc/apt/sources.list file

sudo nano /etc/apt/sources.list

At the very end of the file add two lines:

Deb http://download.webmin.com/download/repository sarge contrib deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Save and close the file. Now let's import the keys

wget http://www.webmin.com/jcameron-key.asc

sudo apt-key add jcameron-key.asc

Update the list of package sources

sudo apt-get update

install webmin

sudo apt-get install webmin

Launching Webmin

After successfully installing the package, open your browser and go to

https://server-ip-address:10000/

instead of " server-ip-address ” Enter either the server's IP address or its name. If you did everything correctly, you will see a prompt to enter your username and password.

Enter your server login and password in the fields, after which you will be taken to the webmin main page

The first thing we will do is change the language to Russian. To do this, go to the menu item “ Webmin” — “Change Language and Theme” and set the encoding Russian (RU.UTF-8)
After applying the changes, you need to refresh the page. Great! Now you have a completely Russified webmin


A little review of webmin

I won’t describe all the menu items, take a look for yourself and find a lot of interesting things for yourself. I focus on the most basic points.

The “Webmin” section provides tools for working with the webmin module itself. Setting up users, accesses, Reserve copy etc.

The “System” section provides tools for working with the main functionality of the server. In this section you can find logs, perform operations with users and groups, update software, manage active processes, work with job scheduling (Cron) and much more.

In the “Network” section you can configure network interfaces and also configure the firewall

In the “Equipment” section you can view the equipment connected to the server, as well as view the partitions of local disks.

I will not describe the “Cluster” section. Didn't work with clusters.

Now you can configure webmin in ubuntu server and use it from anywhere in the world.

The previous article discussed the use of a graphical shell to optimize work with a server running Linux. But what to do if its use for one reason or another is not advisable? Perform work in the console?

Fortunately for Linux there is another alternative - a web interface.

The Webmin application was developed specifically for Linux administration. It is a simple web server and a set of scripts in Perl, which provide the functionality of the web interface.

InstallationWebmin

There is no information about the repository for installing Webmin on the system initially. Therefore, it must be added first.

To do this, you need to open the /etc/apt/sources.list file and add the following line at the end:

deb http://download.webmin.com/download/repository sarge contrib

Now you can start the Webmin installation using the command:

apt-get install webmin

apt - get install webmin

After installation, Webmin automatically starts. The login page is available at the server address via port 10000 ( server_address:10000)

Login to the system is carried out using the credentials of a local user who has administrative privileges.

Work withWebmin

After logging in, we get to the Webmin start page.

This page contains brief information system information (Webmin version, processor type, memory used, used disk space, etc.) and the main menu (located on the left).

Webmin is quite complicated software with many modules and functions and, even with all the desire, working with it cannot be fully described in one article. Therefore, we will briefly dwell only on the main details.

The main menu consists of several sections:

  • Webmin
    Settings directly from Webmin;
  • System
    System information and system settings (user, processes, services, etc.);
  • Servers
    Management of installed servers (web servers, database servers, etc.)
  • Others
    Administration tools not included in other sections (file manager, console window, etc.);
  • Networking
    Network settings;
  • Hardware
    Hardware management (system time, disk management, printer management, etc.);
  • Cluster
    Management of several servers united in a cluster. Webmin is installed on only one of them. Work with the rest is carried out using the RPC protocol;
  • Un-usedmodules
    Unused Webmin modules. Modules that have been installed, but the required components are missing on the server for them to work. If these components are subsequently installed, in order to connect the necessary modules, it is necessary to update the modules (“Refresh Modules”);
  • Search
    Webmin internal search;
  • ViewModule'sLogs
    Webmin module change logs;
  • SystemInformation
    Brief information about the system. Is home page y when logging in.
  • RefreshModules
    Updating Webmin modules. Changes will only take effect after logging out and logging in again;
  • Logout
    Sign Out.

When opening file manager The root directory of the file system is displayed. Using hyperlinks, you can go to certain folders and open or download files to your computer.

The screenshot below shows the Documents directory in the home directory of one of the users.

This file manager allows you to perform only simple operations. Creating directories and text files, editing text files, creating archives, unpacking archives (if available, for example, unzip), uploading files from a computer to a server and vice versa.

It is also worth noting the ability to change the owners of files and folders and access rights to them using the file manager interface.

This is especially true when you consider that files and folders are created with a default owner of root:root and permissions of 755 and 644, respectively.

Of course, from a security point of view, it is not worth giving full access to everyone. But, using the default owner can also cause various problems. For example, if the web server does not have write rights, in the directory with the site many web applications may not work correctly or not work at all.

Therefore, the file system access strategy must be properly thought out.

Working with the console

To work with the console, use the “Text Login” page in the “Others” section.

The black field exactly imitates the operation of the Linux console. Therefore, if you need access to a regular console, Webmin provides this option.

Using the “Open in separate window...” button, you can open the “console” in a separate browser window.

Work with

The module for working with Apache is available in the “Servers” section of the main menu via the “Apache Webserver” link.

On the module's start page you can see a list of all available virtual hosts.

When you click on the icon next to the host name, its settings page will open.

In essence, this is nothing more than a web interface for working with host configuration files. With its help, you can configure all its parameters, including redirections (redirects), error tracking, resource limits (well known to users virtual hosting) etc.

If desired, you can also edit the host configuration file manually (“Edit Directives”).

The “Create virtual host” tab is used to create a new virtual host and contains basic settings.

After creating a virtual host, it will be displayed in the general list on the main page of the module and you can fine-tune it.

The "Global configuration" tab contains general Apache settings.

In particular, you can edit the server configuration files (“Edit Config Files”), change the user name and group that are used to operate Apache (“User and Group”), enable or disable additional Apache modules (“Configure Apache Modules”).

Work with MySQL

The module for working with Apache is available in the “Servers” section of the main menu via the “MySQL Database Server” link.

The module interface is intuitive.

On the main page you can configure general MySQL settings or create or delete a database.

When you click on the database icon, a page with a list of its elements will open.

The built-in visual editor allows you to create tables and views.

If necessary, you can also perform an arbitrary SQL query(“Execute SQL” button).

The query can be written manually, or it can be loaded from a SQL script. This allows you to easily restore your database from a backup.

The ability to create backup copies is also supported.

The backup copy is saved in the SQL script, but the file name along with the extension must be specified explicitly.

In general, the module for working with MySQL is not much inferior in its capabilities to phpMyAdmin. Therefore, when working with Webmin, in most cases you can even abandon this application.

Webmin

If necessary, Webmin can be easily Russified.

In order to change the interface language in Webmin, you need to follow the “Change Language and Theme” link. Then set the “Webmin UI language” switch to the “Personal choice” position and select “Russian (RU.UTF-8)” from the drop-down list.

After clicking the “Make changes” button, the changes will take effect, but they will be visually displayed only after full reboot pages.

It is also worth noting that not all components have support for the Russian language. At least the full one.

For example, the module for working with MySQL is only partially Russified.

Summary

The Webmin application not only allows you to perform general administration tasks for servers running Linux, but can also replace a number of programs.

However, its functionality is significantly limited by the capabilities of those modules that are installed in the system.

In addition, Webmin is significantly inferior to conventional graphical shells not only in terms of extensibility, but also functionality. Still, the web interface remains web interface. But, if in the case of a graphical shell for remote administration it is necessary to additionally install a VNC or RDP server and the corresponding client on the administrator’s computer, then Webmin does not require anything other than a browser.

Thanks to this, coupled with its functionality and ease of installation, the Webmin application has gained wide popularity.

Webmin is not an exclusive alternative to graphical shells and can even work in parallel with them. Choosing a specific environment for working with a server is more a matter of convenience and specific working circumstances.

mob_info