Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Webmin Administrator's Cookbook
Webmin Administrator's Cookbook

Webmin Administrator's Cookbook: Over 100 recipes to leverage the features of Webmin and master the art of administering your web or database servers.

eBook
$25.99 $28.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Webmin Administrator's Cookbook

Chapter 2. User Management

In this chapter, we will cover:

  • Creating a Webmin user

  • Creating a Webmin group with access to specific modules and options

  • Allowing users to log in to Webmin with the system credentials

  • Creating Webmin users based on system accounts

  • Controlling who is currently using Webmin

  • Creating a system user account

  • Modifying a user's UID and other information

  • Temporarily disabling a user account

  • Creating and editing a system group

  • Changing a user's password

  • Exporting users and importing them into another system

  • Installing Usermin

Introduction


Webmin's user management features are quite sophisticated. You can use Webmin to manage users and groups on your system, decide which of them have access to Webmin, and which modules they will be allowed to see. You can also create special Webmin-only users, who will not have regular accounts on your system, but will still be able to access selected Webmin modules.

If you're the main administrator of a system, you can set up Webmin to allow other administrators to modify only selected parts of your system's configuration. For instance, you can allow sub-administrators to configure the Apache web server but not to change other settings. This particular workflow is so common, in fact, that a sibling product to Webmin called Usermin was developed to allow non-administrators access to a Webmin-like environment through which they can access databases, configure web hosts, set up cron jobs, and read local mail.

Note

Webmin distinguishes between two types of users:

  • Unix users (system...

Creating a Webmin user


The simplest way to grant someone access to Webmin is to create a Webmin user account for him/her. You can regulate which IPs the user will be allowed to log in from and even at what times during the week the access will be open. During account creation, you can specify what modules the user will have access to or which group he/she will belong to.

In this recipe, we will create a new user with access to only one module.

Getting ready

We will create a new user account with a single-use password, which the user will have to change after the first login. In order to use this one-time password, we need to enable a feature in Webmin. Perform the following steps to set the password expiry policy:

  1. Go to Webmin | Webmin Configuration | Authentication.

  2. Set the Password expiry policy option to Prompt users with expired passwords to enter a new one.

  3. Webmin's server process will restart; wait for a few seconds before continuing.

How to do it...

Perform the following steps to create a...

Creating a Webmin group with access to specific modules and options


Webmin users should be organized into groups. If you have more then one user whom you would like to equip with the same privileges, creating a group is the way to go. Webmin provides very granular permissions, which you can grant to each group. You can set the following three types of permissions:

  • Specify which Webmin modules are available to a group

  • Set global permissions, which apply to all modules

  • Set module-level access control settings, specifying which options of each module will be available

    Tip

    Permissions for an individual account can be configured with the same level of granularity.

How to do it...

In this recipe, we will create a Webmin group with access limited to viewing log files from the /var/log directory:

  1. To create a new Webmin group, navigate to Webmin | Webmin Users, and click Create a new Webmin group.

  2. Name the new group log_viewers, and supply a group description.

  3. In the Available Webmin modules section, select...

Allowing users to log in to Webmin with the system credentials


Webmin's default settings don't allow regular system users to log in to Webmin, but at least one user is allowed to log in after installation. Depending on the settings included in your Webmin package, that may be any of the following:

  • The root user

  • Users with unrestricted root access via sudo (specifically those with an ALL=(ALL) ALL rule)

  • The user created during manual Webmin installation

In this recipe, we will allow all users of a Unix group to log in to Webmin with limited permissions.

Getting ready

We need to begin by creating a standard Webmin account, which will be shared by all system users we grant access to. Refer to the recipe, Creating a Webmin user, for instructions, and create a Webmin account, named webmin_user, for instance, with specific permissions.

How to do it...

Follow these steps to allow members of a system group to log in to Webmin:

  1. Navigate to the Webmin | Webmin Users | Configure Unix User Authentication screen...

Creating Webmin users based on system accounts


In previous recipes, we talked about creating Webmin users and allowing system users to log in as a chosen Webmin account. You may choose to have a more direct, one-to-one correspondence between Webmin and system accounts. You can achieve this by creating Webmin accounts for selected existing users and setting up account synchronization for users added in the future.

Getting ready

In this recipe, we will create a Webmin account for each system user. All new Webmin accounts will be assigned to a Webmin group. Before we begin, set up a Webmin group following the recipe, Creating a Webmin group with access to specific modules and options.

How to do it...

Our first step will be to create Webmin accounts for existing system users:

  1. Navigate to Webmin | Webmin Users | Convert Unix To Webmin Users.

  2. Select the users you would like to add to Webmin.

  3. Select the Webmin group to assign them to.

  4. Click Convert Now.

Webmin accounts for all selected users should now...

Controlling who is currently using Webmin


Webmin keeps a log of all the actions performed by users. You can inspect a list of currently open user sessions, check what actions were performed during a session, or close a session, forcing the user to be logged out.

How to do it...

Perform these steps to check which users are currently logged into Webmin:

  1. Navigate to Webmin | Webmin Users.

  2. Click the View Login Sessions icon.

  3. To view the actions performed by the user in this session, click the View logs link next to any session.

You can close any session, except your own, and force the user to log in again. To do this, click the link in the Session ID column. The next time this user clicks a link or submits a form, he/she will be asked to log in again.

How it works...

Whenever a user logs in, Webmin creates a session for him/her. A session consists of a specific ID and associated information about who the owner of the session is and whether the session is active.

The session ID is passed to the user's...

Creating a system user account


Creating user accounts in Unix is a multistep process: you need to add user data to system configuration files, create a home directory, copy template files to that directory, and set ownership of those files to the new user. Webmin automates this process for you.

Tip

In addition, if you set up synchronization, a Webmin account will also be created for the new user. Refer to the recipe, Creating Webmin users based on existing system accounts, for more information about account synchronization.

Getting ready

We will create a new user account with a single-use password, which the user will have to change to after the first login. In order to allow the user to change the password through Webmin, go to Webmin | Webmin Configuration | Authentication, and set the Password expiry policy option to Prompt users with expired passwords to enter a new one.

How to do it...

Perform the following steps to create a system user account:

  1. Navigate to System | Users and Groups, and click...

Modifying a user's UID and other information


Modifying basic information about an existing user is usually quite simple. The exception to this rule is the change of a user's UID. This is sometimes necessary if a user has accounts on two different Unix systems and both systems have to identify him/her as the same person. A typical example of this situation is sharing files over NFS as we will discuss in Chapter 6, Managing Files on Your System.

Changing a UID requires an update of file ownership of all files belonging to that user. This can be quite tedious, but Webmin does the job for us.

How to do it...

Follow these steps for modifying a user's UID:

  1. Navigate to System | Users and Groups, and click the username link of the account you want to edit.

  2. On the next page, you will be able to edit all the basic user information, including the username, ID, home directory location, chosen default shell program, primary and secondary system groups, and so on.

  3. Change User ID to a different value.

  4. In the...

Temporarily disabling a user account


If a person stops using your system, it's often a good idea not to delete their account, but rather to disable it. Perhaps you need to preserve data for forensic purposes, the user would need access to your system again in the future or is the owner of files on your system, which you don't want to delete or leave orphaned.

How to do it...

Disabling a user account through Webmin is very easy. Perform the following steps to do so:

  1. Navigate to System | Users and Groups, and click the username link of the account you want to edit.

  2. On the next page, check the box labeled Login temporarily disabled.

  3. Click Save.

    Tip

    You can re-enable the account by following the same procedure. Just uncheck the Login temporarily disabled box, and hit Save.

How it works...

To disable a user account, Webmin updates the /etc/shadow file, which stores hashed user passwords. The password hash for the selected user is prepended with an exclamation point (!). This invalidates the hash and makes...

Creating and editing a system group


Creating and editing system groups through Webmin is very simple; just follow the steps outlined.

How to do it...

Let's start by creating a group as follows:

  1. Navigate to System | Users and Groups, and click through to the Local Groups tab.

  2. Click Create a new group.

  3. On the next page, you will be asked to specify basic group information. Set Group name to a chosen name, and leave Group ID set to Automatic. Ignore the password fields.

  4. You can now add any user you choose to the group by moving them from the left to the right column of the Users widget.

  5. Click Create to finish and create the group.

You can now edit the group by performing the following steps:

  1. Go back to System | Users and Groups, and click the Local Groups tab.

  2. Click the group's link in the Group name column.

  3. You will be brought to a screen with a form similar to the one used to create a group, with one difference. If you now change a group's ID, you can tell Webmin to update files on the system with the...

Changing a user's password


When a user forgets his/her password, he/she will contact you as the system's administrator and request a password reminder. For security reasons, passwords are stored on your system only in the form of cryptographic hashes, not plain text. Because of this, you cannot send passwords to users, but you can reset a password and send the new one to the user. The best practice in such a case is to make the new password usable only once, allowing the user to log in, but requesting that he/she immediately change it to a password of his/her own choice.

In this recipe, we will describe how to reset a user's password to a one-time value.

Getting ready

In order to use single-use passwords in Webmin, we need to enable this feature. Go to Webmin | Webmin Configuration | Authentication, and set the Password expiry policy option to Prompt users with expired passwords to enter a new one.

How to do it...

Perform the following steps to change the user's password:

  1. Navigate to System |...

Exporting users and importing them into another system


When you're setting up another server for your organization, you may need to recreate accounts of multiple users on the new system. Webmin's user management module has the ability to export data about existing user accounts to a special batch file, which you can then import into any other system that also runs Webmin. This allows you to recreate multiple accounts quickly and easily.

How to do it...

In this recipe, we will export selected users from one system (source) and import them into a second system (destination).

Let's start by exporting users as follows:

  1. On your source system, navigate to System | Users and Groups, and click the link marked Export to batch file.

  2. Set Batch file format to Standard passwd and shadow files.

    Tip

    Note that you should use an export format compatible with the destination operating system. Use the Standard format if you're exporting to Linux, but use the BSD, Mac OS, or AIX specific formats if you're exporting...

Installing Usermin


If you would like to make the basic functionality of your system available to its users through an interface similar to Webmin, you can use Webmin's companion product called Usermin. This environment is just as easy to use as Webmin and provides a number of features that do not require administrative privileges:

  • Reading e-mails

  • Setting up mail forwarding and auto-replies

  • Setting up scheduled e-mails

  • Changing passwords

  • Executing system commands

  • Opening an SSH session in the browser

  • Configuring Apache virtual hosts

  • Configuring MySQL or PostgreSQL databases

  • Setting up CRON jobs or scheduled command execution

How to do it...

Installation of Usermin is very simple and using it is analogous to using Webmin. The main difference is that you connect over a different port; the default port for Usermin is 20000.

Let's start by installing Usermin:

  1. If you've installed Webmin from its repository, follow the recipe, Installing software packages from Chapter 1, Setting Up Your System, and install...

Left arrow icon Right arrow icon

What you will learn

  • Learn how to install, configure, and use Webmin
  • Set up file sharing over FTP, SFTP, NFS, and CIFS (Windows Networking)
  • Monitor the state of your server and analyze system logs
  • Get started with popular technologies such as WordPress, Drupal, and Django
  • Learn to manage files and folders on your system
  • Run an Apache web server
  • Set up web applications written in PHP and Python

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 26, 2014
Length: 376 pages
Edition :
Language : English
ISBN-13 : 9781849515856
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Mar 26, 2014
Length: 376 pages
Edition :
Language : English
ISBN-13 : 9781849515856
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 158.97
Network Analysis using Wireshark Cookbook
$54.99
Webmin Administrator's Cookbook
$48.99
Implementing Samba 4
$54.99
Total $ 158.97 Stars icon

Table of Contents

12 Chapters
Setting Up Your System Chevron down icon Chevron up icon
User Management Chevron down icon Chevron up icon
Securing Your System Chevron down icon Chevron up icon
Controlling Your System Chevron down icon Chevron up icon
Monitoring Your System Chevron down icon Chevron up icon
Managing Files on Your System Chevron down icon Chevron up icon
Backing Up Your System Chevron down icon Chevron up icon
Running an Apache Web Server Chevron down icon Chevron up icon
Running a MySQL Database Server Chevron down icon Chevron up icon
Running a PostgreSQL Database Server Chevron down icon Chevron up icon
Running Web Applications Chevron down icon Chevron up icon
Setting Up an E-mail Server Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(11 Ratings)
5 star 18.2%
4 star 72.7%
3 star 0%
2 star 9.1%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Roberto Avilés Jun 12, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A great resource for the people currently working in system administration, or wishing to move into the ‘sysadmin’ area, this book on WEBMIN, an open source (web-bases system configuration tool mainly written in PERL) ‘tool’ that allows us to control a system remotely, through the web, from any computer with a browser, describes in 12 chapters what it takes to use Webmin to get the most of your system, including tips on clustering functions. Chapter 1 is about Setting up you system, Chapter 2 on the User Management, Chapter 3 Securing the System, Chapter 4 about Controlling it, Chapter 5 Monitoring, Chapter 6 about Managing Files, Chapter 7, Backing the System, Chapter 8, Running an Apache Web Server, Chapter 9, Running a MySQL Database Server, Chapter 10, Running a PostgreSQL DB Server, Chapter 11, Running Web Applications and Chapter 12 is about Setting Up an E-mail Server.This well written book contains many examples that will guide you through the many packages and tools Webmin provide. Every chapter is a step-by-step guide through procedures that enable us to install, control and get the most of our specific system. Is a well written book, you will forget this is a technical one and soon it will be your swiss knife on your desktop or shelves, for every problem you need to solve related to the administration of your system.
Amazon Verified review Amazon
Angelo Caruso Jun 08, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Often a Linux appliance, on a real or virtual machine, is the best way to go for effectively put up a service in your network. Then a friendly way to administer this server becomes a primary need, specially if you, as me, are not a system administration guru!Webmin is the best answer I know to this need and its primary advantage is it doesn't add further complexity to the situation.This book covers with a very practical approach most of the tasks you should perform administering a system using Webmin, from installing the webmin tool itself to put up a database or email service, without requiring you to become a guru or even knowing commands and all the complexities behind them.I regret only the book not being available when I began experimenting Webmin, now it is, so I recommend you to get a copy!
Amazon Verified review Amazon
BRANKO BOGUNOVIC Jun 01, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Webmin Amin Cookbook, gives you a good introduction of Webmin tool in everyday administration work. It is mostly suited work Linux based (Debian/Fedora) OS and is good alternative to the some commercial tools such as CPanel.Content of the book is well written and it is easy to follow. Some chapters (3 Securing Your System,5 Monitoring System and 7 Back Up) are very interesting and useful particular from the view where everything is possible to to in Webnin without using bash in the console. However some other chapter in my opinion are just brief introduction to the larger scope databases(MySql and Postgres) and web server(Apache) and I would recommend some other more specialized books on these topics. Overall I recommend this book to everyone how has any kind of connection with administrating Unix based OS.
Amazon Verified review Amazon
Geek On The Hill Jul 20, 2020
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
If you're moving from some other Web server control panel to Webmin / Virtualmin, and you're clueless about it, this book will serve as a good introduction to how the Webmin panel works.On the other hand, it's somewhat out-of-date; so although you'll be in a better place than you were before, you'll still have to educate yourself on more recent developments.In fairness, however that's true of pretty much anything in IT. By the time a book gets to press, it's already starting to get obsolete. So if you need to learn Webmin / Virtualmin, this is as good a way as any to start learning as any. Just be aware that you'll still need to bring yourself up to date.Richard
Amazon Verified review Amazon
Amazon Customer Jun 02, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I'm glad some one put out a resource for Webmin. After reading several reviews I came to the conclusion that Webmin was the best software to use for my VPS. This textbook did the trick. A few things I tried didn't work however and I had to search through other documents (hence the 4 stars)... The book is well laid out and maybe jumping around chapters screwed me up. Webmin is a great program if you want a OS alternative to CPanel. Good book for a great program. Give it a try.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.