I have removed the root password from my machines using 'passwd -d root' so that it's only possible to authenticate as root using SSH keypairs or as a sudoer.
This causes the code in miniserv.pl to fail when trying to detect whether PAM is enabled. The pam_conv callback is never triggered when pam_authenticate() is called. This is the test that miniserv uses to check to see if PAM is working.
I needed to change line 104 of miniserv.pl from
if (ref($pamh = new Authen::PAM($config{'pam'}, "root",
to
if (ref($pamh = new Authen::PAM($config{'pam'}, "webmin",
(after adding a 'webmin' user with a password to my machine)
Perhaps the user that miniserv tests pam_authenticate for should be a config param in miniserv.conf?