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

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.

1 Like

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!

1 Like

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.