56.9. Creating Usermin Modules

Usermin has a very similar architecture to Webmin, so its modules have an almost identical design to Webmin modules. The main difference is that Usermin is designed to be used by any UNIX user on a server to perform tasks that they could perform from the command line. Any third-party Usermin modules should be written with this in mind.

By default, module CGI programs are run as root, just like in Webmin. This is necessary because some tasks (like changing passwords) can only be done as root. Most Usermin modules, however, do not need super-user privileges and so should call the standard switch_to_remote_user function just after calling init_config in order to lower privileges to those of the logged-in user.

Usermin ...

Get Managing Linux® Systems with Webmin™ System Administration and Module Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.