Usermin Installation

Before you can use Usermin, you will have to install it. Unlike Webmin, at the time of this writing no major Linux distribution or UNIX vendor is including Usermin in its standard installation or offering it as an optional package. This will certainly change in time, and OS vendors may be installing it by the time you read this. Check with your vendor for packages, or simply download it from the Usermin website.

Checking for the Authen-PAM Perl Module

Installing Usermin is just about like installing Webmin, with the one exception that it is recommended to install the Authen-PAM Perl module before installation of Usermin. So first it will be necessary to check for, and possibly install, this Perl module. The easiest way to check for a Perl module is to use a command like the following:

[root@grover root]# perl -e 'use Authen::PAM; print "Success!\n"'  

If this module is available, you will see only the word “Success!” printed on the next line. If the module is not installed, a number of errors will result instead. If you have success with the module check, proceed to the next section. If not, visit the Comprehensive Perl Archive Network (CPAN for short) at [http://www.cpan.org]. Use the search function to find the latest version of Authen-PAM, download it, and follow the instructions in the README file that is included. Briefly, all CPAN Perl modules are installed in the same simple way.

First generate a makefile by running the Makefile.PL file, as follows:

[root@grover Authen-PAM-0.13]# perl Makefile.PL 

If successful, run make and make install.

[root@grover Authen-PAM-0.13]# make  [root@grover Authen-PAM-0.13]# make install 

Next, use the Perl command suggested at the beginning of this section to test for the availability of the module. Then add a PAM service called usermin in the appropriate location. Under many Linux distributions, this involves creating a file named /etc/pam.d/usermin that contains the following:

#%PAM-1.0 auth     required        pam_unix.so     shadow nullok account  required        pam_unix.so password required        pam_unix.so     shadow nullok use_authtok  session  required        pam_unix.so

Now the installation of Usermin should proceed smoothly.

Note 

You may be able to download a package of Authen-PAM for your operating system, which is usually preferable from a system maintenance perspective. Also, if you use an RPM-based Linux distribution, you may be able to use cpanflute or cpanflute2 to automatically generate a package from the Perl module, if your vendor doesn’t provide a package for you. The use of cpanflute is not discussed in this book. However, it is worth looking into if you frequently install Perl modules, because it makes generating Perl module RPMs a simple and painless process.

Obtaining Usermin

Lucky for us, Usermin is free under a BSD-style license, just like its more powerful sibling. It can be downloaded for free from the Usermin site or one of its mirrors. For reference the primary Usermin site is [http://www.usermin.com ]. Like Webmin, Usermin is available in a tarball, as well as an RPM for Red Hat, MSC Linux, Caldera, Mandrake, and SuSE. Unlike Webmin, there is currently no Solaris package of Usermin. Choose the most appropriate option for your system.

Installing the Package or Tarball

Depending on the installation method, you follow similar steps as you did for installing Webmin. For the tarball, copy it to the desired installation location (usually /usr/local), unzip it, untar it, and run the setup.sh script:

[root@delilah /root]# cp usermin-0.6.tar.gz /usr/local  [root@delilah /root]# cd /usr/local  [root@delilah local]# gunzip usermin-0.6.tar.gz  [root@delilah local]# tar xf usermin-0.6.tar  [root@delilah local]# cd usermin-0.6  [root@delilah local]# ./setup.sh 

The install script will ask a series of questions, for most of which you should accept the default values. After the installation script finishes running, you will be able to log in to the Usermin server on port 20000.

Installing Usermin from an RPM

Installing from an RPM package is, just like with Webmin, even easier than installation from the tarball. When installing from a package, it is still necessary to insure you have the PAM Perl module as documented previously (if you will be using it). Then use the following command for an RPM installation:

[root@delilah /extra]# rpm -Uvh usermin-0.6-1.noarch.rpm 

The RPM will automatically run the installation script with sensible defaults and start the Usermin server on port 20000.



The Book of Webmin... or How I Learned to Stop Worrying and Love UNIX
The Book of Webmin: Or How I Learned to Stop Worrying and Love UNIX
ISBN: 1886411921
EAN: 2147483647
Year: 2006
Pages: 142
Authors: Joe Cooper

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net