Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

Installing Webmin On Ubuntu Feisty Fawn (7.04)


This document describes how to setup Webmin on an Ubuntu Feisty Fawn (7.04) server. The server I used was previously setup according to the HowTo Forge document called Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 6.10 Edgy Eft).

The only changes I had made to the setup shown there was to install Mondo for backups and also revert the dcc-client and dcc-server back to version  1.2.74-2. I had to do this to get the DCC client and server running on Feisty as there was no upgrade package for it (yet??)  and the instructions above were designed for Ubuntu Edgy Eft (6.10)

Version: 1.2.74-2
Depends: libc6 (>= 2.3.4-1), dcc-common (= 1.2.74-2)
Filename: pool/universe/d/dcc/dcc-server_1.2.74-2_i386.deb

 

What Is Webmin?

Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely. See the standard modules page for a list of all the functions built into Webmin, or check out the demo and screenshots.

 

Why Not Use A .deb Package?

As of July 15th 2006 webmin.com has had a testing deb for the full webmin package. In order to use this, the root account needs to be enabled, which breaks one of the major security guides for Ubuntu. Using the following method of installing Webmin removes the need to enable the root account.

The Instructions

Install SSH

sudo apt-get install ssh openssh-server

Enable the universe and multiverse repositories in the

/etc/apt/sources.list

Create an installation location

I choose to install webmin in my /opt folder. Others may have a different preference.

The commands are as follows:

cd /opt

sudo mkdir webmin

cd /opt/webmin

Download the webmin source

I went to the webmin site ( http://www.webmin.com/support.html ) and sourced the tar version of Webmin. The source I downloaded can be found here.

sudo wget http://prdownloads.sourceforge.net/webadmin/webmin-1.360.tar.gz

sudo tar xzvf webmin-1.360.tar.gz

Install extra required modules

There are a couple of modules you may require for SSL connection to webmin. If you are concerned about the implications of doing this then run the following command with the -s option and ‘rehearse’ your install:

sudo apt-get install libauthen-pam-perl libnet-ssleay-perl libpam-runtime openssl perl perl-modules

The Setup

Webmin is set up with the standard setup shell command.

cd webmin-1.360/

sudo ./setup.sh

You should see

***********************************************************************
* Welcome to the Webmin setup script, version 1.360 *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.
Installing Webmin in /opt/webmin/webmin-1.360 …
***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time you can just accept the defaults.
Config file directory [/etc/webmin]:

In general accept the defaults but choose SSL and the ‘Auto Start The Service At Boot’ option.

You will be asked a few questions.

Config file directory [/etc/webmin]: [enter]
Log file directory [/var/webmin]: [enter]
***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.
Full path to perl (default /usr/bin/perl):
[enter]
Testing Perl …
Perl seems to be installed ok
***********************************************************************
Operating system name: Ubuntu Linux
Operating system version: 7.04
***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
– What port to run the web server on. There must not be another
web server already using this port.
– The login name required to access the web server.
– The password required to access the web server.
– If the webserver should use SSL (if your system supports it).
– Whether to start webmin at boot time.

At this point you may want to choose a different port. Security by obscurity is no security at all but it does stop the casual nosey parkers.

For my system I choose 23646 (‘admin’ on a mobile phone pad).

Web server port (default 10000): 23646
Login name (default admin): [enter]
Login password: myS3cr3t
Password again: myS3cr3t
Use SSL (y/n): y
Start Webmin at boot time (y/n): y

The install starts:
***********************************************************************
Creating web server config files..
..done
Creating access control file..
..done
Inserting path to perl into scripts..
..done
Creating start and stop scripts..
..done
Copying config files..
..done
Configuring Webmin to start at boot time..
Created init script /etc/init.d/webmin
..done
Creating uninstall script /etc/webmin/uninstall.sh ..
..done
Changing ownership and permissions ..
..done

Attempting to start Webmin mini web server..
Starting Webmin server in /opt/webmin/webmin-1.360
..done
***********************************************************************
Webmin has been installed and started successfully. Use your web
browser to go to
https://server1.example.com:23646/
and login with the name and password you entered previously.
Because Webmin uses SSL for encryption only, the certificate
it uses is not signed by one of the recognized CAs such as
Verisign. When you first connect to the Webmin server, your
browser will ask you if you want to accept the certificate
presented, as it does not recognize the CA. Say yes.
user@server1.example.com:/opt/webmin/webmin-1.360$

Thunderbirds Are Go … Or At Least Webmin Is

Being the paranoid person I am I rebooted my linux box in order to see there were no errors after the install had completed. It also ensures that the service is starting automatically after a server restart. For me, the reboot went successfully. For you it will hopefully do the same. However, if you are on a live system … do not reboot unless you want the wrath of users to fall on you hard.

sudo reboot

Broadcast message from user@server1.example.com (/dev/pts/1) at 7:05 … The system is going down for reboot NOW!

Alternatively you can check that webmin is running correctly (without rebooting) by running the following command:

sudo /etc/init.d/webmin status

Which should show something like

webmin (pid 4326) is running

To check it is listening on the correct port (23646 in this case):

sudo netstat -tap

tcp 0 0 *:23646 *:* LISTEN 4326/perl
So What Are You Waiting For?

Log in and use it:
Copy this url into your web browser: https://192.168.0.1:23646/

You should see the following screen

7083672925106176ef0a4131bbc33691-2398

SSL Cert Confirmation

Accept it and click OK.

The logon screen should appear.

1cc72bbe7e2c0d167372f68a54534b53-2402

Enter your details:

User: admin
Password: myS3cr3t

Please note: If you use http://192.168.0.1:23646 the following message will appear:

Error – Bad Request
This web server is running in SSL mode. Try the URL
https://192.168.0.1:23646/ instead.

What Next?

After logging in you get the following welcome screen.

e85ca4e531adc49ec860944e349b67cc-2401

Welcome Screen

The main functions are self explanatory. If you need help with webmin there are documents to be found at:

  • The webmin site: http://www.webmin.com/docs.html
  • The webmin wiki: http://doxfer.com/Webmin

 

Some Other Quick Tips

After the installation if you want to access webmin from any machine in your network edit the /etc/webmin/miniserv.conf file.

sudo vim /etc/webmin/miniserv.conf

Change the “allow” option:

[...]
allow=127.0.0.1
[...]

to

[...]
allow=0.0.0.0
[...]

If you want to restrict webmin access to your network or a particular computer, you can also do that here. After changing the setting you will need to restart webmin.

sudo /etc/init.d/webmin restart

Final Note

Some people prefer not to use webmin as they feel it adds extra overhead and takes up too much memory. The average modern server is unlikely to notice webmin but as it does not need to run continuously. If you need it it is a handy tool to have but after you have used it you can always shut it down when it is not needed.

sudo /etc/init.d/webmin stop

And when you need it again ….

sudo /etc/init.d/webmin start

This ensures it doesn’t use any extra processor cycles or memory if your server is running hard already.

Enjoy!

Comments

comments