Error - Perl execution failed Undefined subroutine &main::authentic called at /usr/share/webmin/authentic-theme/index.cgi line 12

:frowning:

It makes no sense to me, sorry! Because your config also worked for me!

What login name did you use to login and what is the output of:

/etc/webmin/miniserv.users

root:x::::::::0:0:::

The fix was to #out those

in etc/webmin/config
#theme_root=authentic-theme

in etc/webmin/miniserv.conf
#preroot=gray-theme
#preroot_root=authentic-theme

thanks for the help!

1 Like

Have you always been using Gray Theme instead of Authentic Theme?

preroot option in miniserv.conf must correspond with theme option in config. This is important.

The fix was to #out those

I am sorry, this cannot be a fix to anything.

I had the same issue and preroot for me was also gray-theme.

I understand that it’s not a fix but by commenting out those lines I got in and could set authentic-theme as theme again.

I wasn’t using Gray Theme but I had it installed.

I’m guessing it would have worked to change preroot to authentic-theme as that is what it’s set as now when it’s working.

This is from miniserv.error, I guess the first part is from the update.

[09/Jan/2021:13:23:14 +0100] [192.168.1.69] /stats.cgi : Perl execution failed : Can’t locate Async.pm in @INC (you may need to install the Async module) (@INC contains: /lib /usr/share/webmin /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /usr/share/webmin/ .) at /usr/share/webmin/authentic-theme/stats.cgi line 12.
BEGIN failed–compilation aborted at /usr/share/webmin/authentic-theme/stats.cgi line 12.

[09/Jan/2021:13:23:18 +0100] [192.168.1.69] /stats.cgi : Perl execution failed : Can’t locate Async.pm in @INC (you may need to install the Async module) (@INC contains: /lib /usr/share/webmin /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /usr/share/webmin/ .) at /usr/share/webmin/authentic-theme/stats.cgi line 12.
BEGIN failed–compilation aborted at /usr/share/webmin/authentic-theme/stats.cgi line 12.

[09/Jan/2021:13:23:22 +0100] [192.168.1.69] /stats.cgi : Perl execution failed : Can’t locate Async.pm in @INC (you may need to install the Async module) (@INC contains: /lib /usr/share/webmin /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /usr/share/webmin/ .) at /usr/share/webmin/authentic-theme/stats.cgi line 12.
BEGIN failed–compilation aborted at /usr/share/webmin/authentic-theme/stats.cgi line 12.

[09/Jan/2021:13:24:11 +0100] miniserv.pl started
[09/Jan/2021:13:24:11 +0100] IPv6 support enabled
[09/Jan/2021:13:24:11 +0100] Using MD5 module Digest::MD5
[09/Jan/2021:13:24:11 +0100] Using SHA512 module Crypt::SHA
[09/Jan/2021:13:24:11 +0100] PAM authentication enabled
[09/Jan/2021:13:24:13 +0100] [192.168.1.69] /index.cgi/ : Perl execution failed : Undefined subroutine &main::authentic called at /usr/share/webmin/authentic-theme/index.cgi line 12.

You would need just to reload the page in browser.

I emptied cache and reloaded the browser with no luck. It ended up being that preroot was gray and theme was authentic that caused it. For me it’s fixed now. Posted the error log simply if it might help you guys nail down how it happened.

That is perfectly correct and expected! If your configuration for themes out of sync then it could cause a lot of troubles.

What I’m baffled about is that people report issues while having correct configs.

@forsman To be clear - you had a missmatch in your configs? preroot option in miniserv.conf file was set to gray-theme and theme option in config file was set to authentic-theme right?

In fact I see the bug finally. It only happens when Webmin is used with sudo capable user, which now makes perfect sense to me and I understand why it’s failing.

This is my bug. Will post a fix after doing final testings.

Sorry everyone!

Okay, this issue has been reproduced and fixed.

It was tricky to find out the cause, as it only affected logins with sudo-capable users.

Webmin 1.971 will have it fixed. Meanwhile, you can manually apply the patch and restart Webmin.

1 Like

Yes, that is correct.
I haven’t used gray-theme more than trying it out once about 6 month ago or so, so that’s why it was a bit confusing for me.

Glad it you’ve managed to reproduce and fix the issue =)

1 Like

Hi Ilia, thanks a lot for the fix. Facing now the same issue. In whick miniserv.pl do I have to apply the fix? Mine in /usr/share/webmin looks very different than the one on GitHub.

Or is there a Workarround available to get back to the old theme version 19.62? I don’t know at the moment how to handle this error :sleepy:

~$ sudo cat /etc/webmin/config
lang=en.UTF-8
logclear=0
webprefix=
gotomodule=
logemail=
real_os_type=Ubuntu Linux
logusers=
logmodulesemail=
theme=gray-theme
logtime=168
logfullfiles=1
tempdelete_days=7
product=webmin
os_type=debian-linux
deftab=webmin
logfiles=1
real_os_version=16.04.1
nohostname=0
referers_none=1
notabs_xxxxxxnet=1
realname_xxxxxxnet=xxxxxx.net
passwd_file=/etc/shadow
os_version=9.0
ownmods_xxxxxxnet=mysql apache webalizer virtual-server filemin passwd proc cron at telnet change-user htaccess-htpasswd mailboxes syslog
find_pid_command=ps auwwwx | grep NAME | grep -v grep | awk ‘{ print $2 }’
logmodules=
ld_env=LD_LIBRARY_PATH
ownmods_sana=mysql apache webalizer virtual-server filemin passwd proc cron at telnet change-user htaccess-htpasswd mailboxes syslog
readonly_sana=virtual-server
notabs_xxxx=1
logperms=
by_view=0
logsyslog=0
nomoduleup=
passwd_cindex=2
theme_root=authentic-theme
realname_xxxx=xxxxxxxxxxxxxx.org
passwd_mindex=4
passwd_uindex=0
notabs=0
md5pass=1
gotoone=0
log=1
nowebminup=
passwd_pindex=1
readonly_xxxxxxnet=virtual-server
path=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin


$ sudo cat /etc/webmin/miniserv.conf
port=22300
addtype_cgi=internal/cgi
realm=Webmin Server
logfile=/var/webmin/miniserv.log
errorlog=/var/webmin/miniserv.error
pidfile=/var/webmin/miniserv.pid
logtime=168
ppath=
ssl=1
no_ssl2=1
no_ssl3=1
no_tls1=1
no_tls1_1=1
ssl_honorcipherorder=1
no_sslcompression=1
env_WEBMIN_CONFIG=/etc/webmin
env_WEBMIN_VAR=/var/webmin
atboot=1
logout=/etc/webmin/logout-flag
denyfile=.pl$
log=1
blockhost_failures=5
blockhost_time=60
syslog=1
session=1
userfile=/etc/webmin/miniserv.users
keyfile=/etc/letsencrypt/live/xxxxxx.com/privkey.pem
passwd_file=/etc/shadow
passwd_uindex=0
passwd_pindex=1
passwd_cindex=2
passwd_mindex=4
passwd_mode=0
passdelay=1
cipher_list_def=1
sudo=1
ipv6=0
no_resolv_myname=0
sockets=
twofactor_provider=totp
logouttimes=
sessiononly=/virtual-server/remote.cgi
preload=
preroot_root=authentic-theme
preroot=authentic-theme
extracas=
no_tls1_2=
ssl_redirect=1
certfile=/etc/letsencrypt/live/xxxxxx.com/fullchain.pem
nolog=/stats.cgi?xhr-stats=general
logout_script=/etc/webmin/logout.pl
login_script=/etc/webmin/login.pl
failed_script=/etc/webmin/failed.pl
logclf=0
logclear=0
loghost=0
root=/usr/share/webmin
mimetypes=/usr/share/webmin/mime.types
server=MiniServ/1.970

I get a login, if I use the correct login info I get the error. If I fail the login I get another chance to login.

I have successfully applied the work-around Ilia provided found here:
https://forum.virtualmin.com/t/perl-error-after-webmin-update/108856/2?u=burpsalot
Thank you!
Should I be making any other changes based on the info I provided?

For anyone seeing this, the 1.971 development release of Webmin from has a fix for this issue.

Yes, you should change theme=gray-theme to theme=authentic-theme on config file to correspond with preroot=authentic-theme on miniserv.conf file, as these options’ values for a user (theme_username and preroot_username) and global (theme and preroot) must correspond.

The only way to get these values out-of-sync is to incorrectly edit it manually, so it’s better to use UI for changing themes or if doing manually keep in mind, that themes must be the same across aforementioned options.

It’s not correct, I got them themes messed up with only the update! I had never before changed setting manually! but I used gray-theme until some weeks ago before this update.
After that I # out the xxx-theme lines, restarted and logged in and changed back to authentic-theme it crashed again. So I manually edited theme=gray-theme to theme=authentic-theme on config file and it worked again. My login is in the sudoers as you wrote. So in my opinion the update set the old settings in config file but the new ones in xx.conf file.

I did too (like rhis) did not manually edit either file before the update.
Anyways, it’s working now based on your fix. Thank you very much Ilia!

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.

Even though you didn’t edit this before update it doesn’t mean those were in sync. However, yes, previously it could work as the theme was figuring its root directory out, while now Webmin is providing it, and it’s dependent on config files.