ERROR — PERL EXECUTION FAILED Undefined subroutine &main::lib_csf_control called at /usr/libexec/webmin/authentic-theme/authentic-lib.pl line 1959

Operating system: CentOS
OS version: 7.9.2009 (Core)
Webmin version: 1.981
I use root user to login

I’ve been running Webmin for a few years now without any issues. Don’t think I logged in for more than a year. Some months back I started getting errors trying to login but didn’t have time to look at it. Now that I do, it looks like I had the authentic theme problem, but there is some other login related problem I’m still having that I need help with.

At some point while on a previous version and mucking with the themes, I was having the same problem as: Not able to login, showing session expired. To answer Ilia in that thread, clicking “Switch User” button did nothing, no reaction. This popup happened when trying to login for the first time, not any kind of reauthentication after logging in once.

Anyway, I currently have the themes set to the recommended miniserv.conf and config and the latest version and still having a login problem. The error when going to http://domain:10000 is:

ERROR — PERL EXECUTION FAILED
Undefined subroutine &main::lib_csf_control called at /usr/libexec/webmin/authentic-theme/authentic-lib.pl line 1959.

Browser console error has:

Failed to load resource: the server responded with a status of 500 (Perl execution failed)

miniserv.conf:

error_handler_403=403.cgi
error_handler_404=404.cgi
error_handler_401=401.cgi
logout=/etc/webmin/logout-flag
passwd_file=/etc/shadow
passwd_uindex=0
passwd_pindex=1
passwd_cindex=2
passwd_mindex=4
passwd_mode=0
passdelay=1
sessiononly=/virtual-server/remote.cgi
preload=
cipher_list_def=1
port=10000
addtype_cgi=internal/cgi
realm=Webmin Server
logfile=/var/webmin/miniserv.log
errorlog=/var/webmin/miniserv.error
pidfile=/var/webmin/miniserv.pid
logtime=168
ssl=0
no_ssl2=1
no_ssl3=1
no_tls1=1
no_tls1_1=1
ssl_honorcipherorder=1
WEBMIN_CONFIG=/etc/webmin
preroot=authentic-theme
preroot_root=gray-theme
#preroot=gray-theme
#preroot_root=authentic-theme
nolog=\/stats\.cgi\?xhr\-stats\=general
root=/usr/libexec/webmin
mimetypes=/usr/libexec/webmin/mime.types
server=MiniServ/1.981
no_pam=1
logouttimes=

config

passwd_cindex=2
real_os_type=CentOS Linux
mobile_theme=authentic-theme
cache_mods=virtual-server
os_version=15.8
passwd_file=/etc/shadow
tempdelete_days=7
cache_size=52428800
os_type=redhat-linux
notabs_domainname1=1
readonly_domainname1=virtual-server
#theme=gray-theme
#theme_root=authentic-theme
theme=authentic-theme
theme_root=gray-theme
lang=en.UTF-8
passwd_mindex=4
passwd_pindex=1
referers_none=0
passwd_uindex=0
real_os_version=7.8.2003
webprefix=
logfiles=1
by_view=0
log=1
realname_domainname2=domainname2
md5pass=1
ld_env=LD_LIBRARY_PATH
find_pid_command=ps auwwwx | grep NAME | grep -v grep | awk '{ print $2 }'
realname_domainname1=domainname1.net
path=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
readonly_domainname2=virtual-server
ownmods_domainname1=mysql apache webalizer virtual-server filemin passwd proc cron at telnet change-user htaccess-htpasswd syslog phpini virtualmin-htpasswd
notabs_domainname2=1
ownmods_domainname2=mysql apache webalizer virtual-server filemin passwd proc cron at telnet change-user htaccess-htpasswd syslog phpini virtualmin-htpasswd
product=webmin

I’ve tried no_pam=1 and no_pam=0 with no difference to browser error shown.

@Ilia What information would be useful to figuring out how to get login working again?

Thanks very much in advance, your help is appreciated!

Hi,

I use root user to login

If so, then you expect gray-theme to be your default?

I think the solution for your issue must be as simple as restarting Webmin:

/etc/webmin/restart

You could also remove preroot_root and theme_root from configs, if you expect Authentic Theme to be your default.

I don’t really care about the theme, whatever works is fine by me!

I should have stated I’ve rebooted and restarted webmin a million times. a CHANGE is required to get this working again.

I commented out preroot_root and theme_root from configs, restarted webmin, opened a new private incognito window, and got the exact same error. And then again in another browser. Same thing.

What is the output of the following (consecutive) commands:

ps aux | grep miniserv | grep -v grep
systemctl restart webmin
ps aux | grep miniserv | grep -v grep
/etc/webmin/restart
ps aux | grep miniserv | grep -v grep

Ilia, thanks for the reply. Output is below:

/ > ps aux | grep miniserv | grep -v grep
root      1140  0.0  0.8 123416 18072 ?        Ss   Aug29   2:19 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5879  0.0  0.7 123424 16736 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5882  0.0  0.7 123424 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5883  0.0  0.7 123424 16736 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5884  0.0  0.7 123424 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5886  0.0  0.7 123424 16736 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5893  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5895  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5902  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5905  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5906  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5910  0.0  0.7 123416 16688 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5911  0.0  0.7 123416 16688 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5912  0.0  0.7 123416 16692 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5914  0.0  0.7 123416 16688 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5952  0.0  0.7 123416 16632 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5954  0.0  0.7 123416 16572 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5955  0.0  0.7 123416 16576 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5957  0.0  0.7 123416 16520 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5958  0.0  0.7 123416 16392 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5961  0.0  0.7 123416 16460 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5964  0.0  0.7 123416 16524 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5966  0.0  0.7 123416 16400 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      6003  0.0  0.7 123416 16340 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      6024  0.0  0.7 123416 16224 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      6034  0.0  0.7 123416 16224 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      6061  0.0  0.7 123416 16288 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root     27404  0.0  0.9  92604 19040 ?        Ss   Sep05   0:15 /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
root     28375  0.0  0.8 123548 17328 ?        S    04:21   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
/ > systemctl restart webmin
/ > ps aux | grep miniserv | grep -v grep
root      1140  0.0  0.8 123416 18072 ?        Ss   Aug29   2:19 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5879  0.0  0.7 123424 16736 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5882  0.0  0.7 123424 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5883  0.0  0.7 123424 16736 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5884  0.0  0.7 123424 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5886  0.0  0.7 123424 16736 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5893  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5895  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5902  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5905  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5906  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5910  0.0  0.7 123416 16688 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5911  0.0  0.7 123416 16688 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5912  0.0  0.7 123416 16692 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5914  0.0  0.7 123416 16688 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5952  0.0  0.7 123416 16632 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5954  0.0  0.7 123416 16572 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5955  0.0  0.7 123416 16576 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5957  0.0  0.7 123416 16520 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5958  0.0  0.7 123416 16392 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5961  0.0  0.7 123416 16460 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5964  0.0  0.7 123416 16524 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5966  0.0  0.7 123416 16400 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      6003  0.0  0.7 123416 16340 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      6024  0.0  0.7 123416 16224 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      6034  0.0  0.7 123416 16224 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      6061  0.0  0.7 123416 16288 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root     28375  0.0  0.8 123548 17328 ?        S    04:21   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root     32478  0.0  0.8  71144 18664 ?        Ss   12:56   0:00 /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
/ > /etc/webmin/restart
Stopping Webmin server in /usr/libexec/webmin
Starting Webmin server in /usr/libexec/webmin
/ > ps aux | grep miniserv | grep -v grep
root      1140  0.0  0.8 123416 18072 ?        Ss   Aug29   2:19 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5879  0.0  0.7 123424 16736 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5882  0.0  0.7 123424 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5883  0.0  0.7 123424 16736 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5884  0.0  0.7 123424 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5886  0.0  0.7 123424 16736 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5893  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5895  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5902  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5905  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5906  0.0  0.7 123428 16740 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5910  0.0  0.7 123416 16688 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5911  0.0  0.7 123416 16688 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5912  0.0  0.7 123416 16692 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5914  0.0  0.7 123416 16688 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5952  0.0  0.7 123416 16632 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5954  0.0  0.7 123416 16572 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5955  0.0  0.7 123416 16576 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5957  0.0  0.7 123416 16520 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5958  0.0  0.7 123416 16392 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5961  0.0  0.7 123416 16460 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5964  0.0  0.7 123416 16524 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      5966  0.0  0.7 123416 16400 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      6003  0.0  0.7 123416 16340 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      6024  0.0  0.7 123416 16224 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      6034  0.0  0.7 123416 16224 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root      6061  0.0  0.7 123416 16288 ?        S    Aug29   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root     28375  0.0  0.8 123548 17328 ?        S    04:21   0:00 /usr/bin/perl /usr/libexec/usermin/miniserv.pl /etc/usermin/miniserv.conf
root     32539  0.0  0.8  71160 18744 ?        Ss   12:56   0:00 /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf

The PIDs are actually changed upon service restart. Looks good.

Also, if you stop Usermin, will it remove all active processes?

Anyway, is there a way I could login and test it?

If so add my SSH public key to your /root/.ssh/authorized_keys file:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClNgCrdnsYVpMu6Ne6OFecTsGighwB/TgdM7b1W3Z+BHFyXlWAsqjAzdcNyeMP3o18Xst8X3QT/13ly/F9+U+KFvD73mE3QuQUWjO6jmo9CDrf+LZxF0CR+z/HCgBJbxeuCt0/F/xkKTyJdIJaTMYSMIuPHNJXtsVYgOJ1Fvzsq9/0BDUw9lovgoQlhS+ywpheBal7UsB802DXKpmFJQ/l5WJtlxmhNy9zy6Oi483ADoRdwN+1U9YLaw5Rl3bTscLhPj8HBFrEUyk/oJn2TpKoqNOJ2Rw1sFL8mkxHokNam5GSybLosEW9g8sFgteOkht8+uRY9HZqWVbtT6hZCxJP # Virtualmin: Ilia

… and I will login some time tomorrow and check things out.

At the moment, by looking at the code, I can only think of one reason when this can happen, and it is only when $ENV{'THEME_ROOT'} fails and authentic-init.pl is not getting read.

I wonder, what happens on your side if you apply this patch:

… however, I truly doubt that it will solve the root of the problem.

If you reboot your server, does it help? :slight_smile:

Ilia,

Unfortunately, no change with the patch.

fails and authentic-init.pl is not getting read.

But if I make the same change at line 1959 of /usr/libexec/webmin/authentic-theme/authentic-lib.pl, then the login error changes to:

ERROR — PERL EXECUTION FAILED
Undefined subroutine &main::get_filters called at /usr/libexec/webmin/authentic-theme/authentic-lib.pl line 1966.

So that means authentic-init.pl is getting read and the problem is before that.

Alright, after logging it and taking a deeper look, I found out that you had pretty broken config and miniserv.conf files. Fixed now.

I have derived few things from this issue, so I will discuss it with the team internally.

Do you have a clue how your configs ended-up in such state?

I installed webmin several years ago and haven’t touched it for pretty much most of that time. This would be an accumulation of updates over the years. Until this theme problem, I don’t recall ever manually configuring webmin, just using webGUI. Let’s Encrypt broke a couple of times that needed attention, but that’s about it.

Theme changes based on this forum were the first time needing to look under the covers.
I made an edit regarding a PAM setting based on google searches and this authentication problem.
And I believe I added a WEBMIN_CONFIG variable to export since it was complaining it wasn’t set. Other than that, just from years of automatic updates.