You are not logged in.

#1 2017-05-08 13:14:50

sovanyio
Member
Registered: 2017-05-08
Posts: 3

New Webmin install won't start. Error: PAM is mandatory.

Hello!

Trying to setup webmin on my arch box and running into a post-install issue. When trying to start via systemd (or without) I get the error

$ sudo systemctl status webmin
● webmin.service - Webmin
   Loaded: loaded (/usr/lib/systemd/system/webmin.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2017-05-08 09:02:56 EDT; 7min ago
  Process: 16972 ExecStart=/etc/webmin/start (code=exited, status=1/FAILURE)
 Main PID: 16972 (code=exited, status=1/FAILURE)

May 08 09:02:55 bloop systemd[1]: Starting Webmin...
May 08 09:02:55 bloop start[16972]: Starting Webmin server in /opt/webmin
May 08 09:02:56 bloop start[16972]: IPv6 support enabled
May 08 09:02:56 bloop start[16972]: PAM use is mandatory, but could not be enabled!
May 08 09:02:56 bloop systemd[1]: webmin.service: Main process exited, code=exited, status=1/FAIL
May 08 09:02:56 bloop systemd[1]: Failed to start Webmin.
May 08 09:02:56 bloop systemd[1]: webmin.service: Unit entered failed state.
May 08 09:02:56 bloop systemd[1]: webmin.service: Failed with result 'exit-code'.

but PAM seems to be installed

$ pacman -Qs pam
local/pam 1.3.0-1
    PAM (Pluggable Authentication Modules) library
local/pambase 20130928-1
    Base PAM configuration for services
local/perl-authen-pam 0.16-2
    Perl interface to PAM library
local/shadow 4.4-3 (base)
    Password and account management tool suite with support for shadow files and PAM

I saw in another post to install perl-authen-pam from AUR and I have but the error remains.

Offline

#2 2017-06-24 16:03:24

xer01ne
Member
Registered: 2011-02-28
Posts: 46

Re: New Webmin install won't start. Error: PAM is mandatory.

Any resolution?  I am having the same issue.  I just removed it (and all of the associated files) and reinstalled.. still having the same results. 

Jun 24 11:58:35 banshee systemd[1]: Starting Webmin...
Jun 24 11:58:35 banshee start[15588]: Starting Webmin server in /opt/webmin
Jun 24 11:58:35 banshee start[15588]: IPv6 support cannot be enabled without the Socket6 perl module
Jun 24 11:58:35 banshee start[15588]: PAM use is mandatory, but could not be enabled!
Jun 24 11:58:35 banshee systemd[1]: webmin.service: Main process exited, code=exited, status=1/FAILURE
Jun 24 11:58:35 banshee systemd[1]: Failed to start Webmin.
Jun 24 11:58:35 banshee systemd[1]: webmin.service: Unit entered failed state.
Jun 24 11:58:35 banshee systemd[1]: webmin.service: Failed with result 'exit-code'.

Nothing is being kicked out in /var/log/webmin/ either.

Have you by chance enabled SSL on your server with certbot?  I am wondering if SSL might have something to do with it?

Offline

#3 2017-06-25 12:04:15

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: New Webmin install won't start. Error: PAM is mandatory.

How did you install webmin ?

Did you build it recently with makepkg using the webmin package in AUR ?

Last edited by Lone_Wolf (2017-06-25 12:04:44)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2017-06-28 08:07:56

xer01ne
Member
Registered: 2011-02-28
Posts: 46

Re: New Webmin install won't start. Error: PAM is mandatory.

Yes, and tried reinstalling the latest version of perl and then perl-authen-pam to see if that fixed the issue, and it didn't.

Last edited by xer01ne (2017-06-28 08:41:41)

Offline

#5 2017-06-28 09:24:01

amish
Member
Registered: 2014-05-10
Posts: 470

Re: New Webmin install won't start. Error: PAM is mandatory.

Have you upgraded to perl-authen-pam 0.16-3?
https://aur.archlinux.org/packages/perl-authen-pam/

Recent perl version has made some changes which causes pam module to fail.

Its been fixed in perl-authen-pam 0.16-3

Original poster has used 0.16-2.

Also what is the output of:

perl -e 'use Authen::PAM;'

Last edited by amish (2017-06-28 09:40:12)

Offline

#6 2017-06-28 19:59:28

xer01ne
Member
Registered: 2011-02-28
Posts: 46

Re: New Webmin install won't start. Error: PAM is mandatory.

Yes, I am using the latest perl-authen-pam.

as for the perl -e command... nothing happened...

[root@banshee roberts]# perl -e 'use Authen::PAM;'


[root@banshee roberts]# yaourt -Ss perl-authen-pam
aur/perl-authen-pam 0.16-3 [installed] (4) (1.52)
    Perl interface to PAM library
[root@banshee roberts]#

Last edited by xer01ne (2017-06-28 19:59:56)

Offline

#7 2017-06-29 01:13:04

amish
Member
Registered: 2014-05-10
Posts: 470

Re: New Webmin install won't start. Error: PAM is mandatory.

Looking at the webmin code, I have a feeling that there is no_pam set to 1 in your config.

What is the output of :

grep -i pam /etc/webmin/miniserv.conf
grep -i pam /etc/webmin/config

if no_pam=1 then change to no_pam=0

Last edited by amish (2017-06-29 01:14:18)

Offline

#8 2017-06-29 01:18:48

xer01ne
Member
Registered: 2011-02-28
Posts: 46

Re: New Webmin install won't start. Error: PAM is mandatory.

I'll check soon.  I figured with all of the perl changes, it would be smart to rebuilding everything "perl".  Additionally, I removed webmin and it's dependencies... now I am getting errors on perl-encode-detect (pretty much what this guys is getting https://bbs.archlinux.org/viewtopic.php?id=227503).

Once I figure this out, then I will rebuild webmin and get back to you.   

Thanks for your help though, it's very much appreciated.

Offline

#9 2017-06-29 01:54:10

amish
Member
Registered: 2014-05-10
Posts: 470

Re: New Webmin install won't start. Error: PAM is mandatory.

For testing I changed no_pam=0 to no_pam=1 for my webmin.

And I got exact same error as you.

So its definitely case of no_pam=1

So try changing it to no_pam=0

Offline

#10 2017-06-29 01:57:32

xer01ne
Member
Registered: 2011-02-28
Posts: 46

Re: New Webmin install won't start. Error: PAM is mandatory.

that's great news!!  thanks.

I just need to figure out this permission error on perl-encode-detect  (it's a dependency of webmin)

Offline

#11 2017-06-29 03:47:52

amish
Member
Registered: 2014-05-10
Posts: 470

Re: New Webmin install won't start. Error: PAM is mandatory.

Sent PR to webmin and accepted.

Next version of webmin will log additional message asking to fix no_pam OR pam_only. (as both can not be set to 1)

Offline

#12 2017-06-29 07:42:53

xer01ne
Member
Registered: 2011-02-28
Posts: 46

Re: New Webmin install won't start. Error: PAM is mandatory.

Thanks for pointing  me in the right direction for perl-encode-detect.... the good news is that is fixed, the bad news is that webmin isn't.. maybe I need to rebuild some more things... anything perl anything pam... my luck pool is running dry

[root@banshee /]# grep -i pam /etc/webmin/miniserv.conf
pam=webmin
pam_only=1
pam_end=1 
pam_conv= 
no_pam=0
  
[root@banshee /]# grep -i pam /etc/webmin/config 

[root@banshee /]# systemctl start webmin
Warning:
 webmin.service changed on disk. Run 'systemctl daemon-reload' to reload units. 
Job for webmin.service failed because the control process exited with error code. 
See "systemctl status webmin.service" and "journalctl -xe" for details.  

[root@banshee /]# systemctl status webmin  

 webmin.service - Webmin
Loaded: loaded (/usr/lib/systemd/system/webmin.service; disabled; vendor preset: disabled) 
Active: 
failed
 (Result: exit-code) since Thu 2017-06-29 03:35:54 EDT; 13s ago  
  Process: 7069 ExecStart=/etc/webmin/start 
(code=exited, status=1/FAILURE)
 
 Main PID: 7069 (code=exited, status=1/FAILURE)  
 
Jun 29 03:35:54 banshee systemd[1]: Starting Webmin... 
Jun 29 03:35:54 banshee start[7069]: Starting Webmin server in /opt/webmin  
Jun 29 03:35:54 banshee start[7069]: IPv6 support cannot be enabled without the Socket6 perl module 
Jun 29 03:35:54 banshee start[7069]: PAM use is mandatory, but could not be enabled! 
Jun 29 03:35:54 banshee systemd[1]: 
webmin.service: Main process exited, code=exited, status=1/FAILURE
 
Jun 29 03:35:54 banshee systemd[1]: 
Failed to start Webmin.
  
Jun 29 03:35:54 banshee systemd[1]: 
webmin.service: Unit entered failed state.
 
Jun 29 03:35:54 banshee systemd[1]: 
webmin.service: Failed with result 'exit-code'.
  
Warning:
webmin.service changed on disk. Run 'systemctl daemon-reload' to reload units. 

Last edited by xer01ne (2017-06-29 07:43:42)

Offline

#13 2017-06-29 07:47:38

xer01ne
Member
Registered: 2011-02-28
Posts: 46

Re: New Webmin install won't start. Error: PAM is mandatory.

Also, I am getting this now:

[root@banshee /]# perl -e 'use Authen::PAM;'                                                                                                                    

Can't locate Authen/PAM.pm in @INC (you may need to install the Authen::PAM module) (@INC contains: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib
/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at -e line 1.                                              
BEGIN failed--compilation aborted at -e line 1.

but...

aur/perl-authen-pam 0.16-3 [installed] (4) (1.50)

Last edited by xer01ne (2017-06-29 07:50:52)

Offline

#14 2017-06-29 08:46:43

amish
Member
Registered: 2014-05-10
Posts: 470

Re: New Webmin install won't start. Error: PAM is mandatory.

perl -e 'use Authen::PAM;'

Should not give error. There is something wrong with PAM module.

Edit /opt/webmin/miniserv.pl

Just after line number 162, which is:

       print STDERR $startup_msg[0],"\n";

Add this line:

foreach $msg (@startup_msg) { print STDERR $msg,"\n"; }

This will not solve anything but it will give more output when you run:

systemctl status webmin

PS: Config file seems fine now.

Last edited by amish (2017-06-29 08:48:25)

Offline

#15 2017-06-29 16:34:33

xer01ne
Member
Registered: 2011-02-28
Posts: 46

Re: New Webmin install won't start. Error: PAM is mandatory.

That's a weird command because I have specifically rebuilt perl-authen-pam a few times and with the new perl.

Jun 29 12:30:03 banshee start[19597]: Starting Webmin server in /opt/webmin
Jun 29 12:30:03 banshee start[19597]: IPv6 support cannot be enabled without the Socket6 perl module
Jun 29 12:30:03 banshee start[19597]: Using MD5 module Digest::MD5
Jun 29 12:30:03 banshee start[19597]: Perl module Authen::PAM needed for PAM is not installed : Can't locate Authen/PAM.pm in @INC (you may need to install the Authen::PAM module) (@INC contains: /opt/webmin /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at (eval 14) line 1.
Jun 29 12:30:03 banshee start[19597]: BEGIN failed--compilation aborted at (eval 14) line 1.
Jun 29 12:30:03 banshee start[19597]: PAM use is mandatory, but could not be enabled!
Jun 29 12:30:03 banshee systemd[1]: webmin.service: Main process exited, code=exited, status=1/FAILURE
Jun 29 12:30:03 banshee systemd[1]: Failed to start Webmin.
Jun 29 12:30:03 banshee systemd[1]: webmin.service: Unit entered failed state.
Jun 29 12:30:03 banshee systemd[1]: webmin.service: Failed with result 'exit-code'.

Offline

#16 2017-06-29 16:47:07

xer01ne
Member
Registered: 2011-02-28
Posts: 46

Re: New Webmin install won't start. Error: PAM is mandatory.

I tried reinstalling everything again... just to see if anything was different...

I get this during the webmin install (with packer)

Running postinstall scripts ..
Can't locate WebminCore.pm in @INC (you may need to install the WebminCore module) (@INC contains: /home/roberts/perl5/lib/perl5/x86_64-linux-thread-multi /home/roberts/perl5/lib/perl5 /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at /tmp/packerbuild-1000/webmin/webmin/pkg/webmin/opt/webmin/run-postinstalls.pl line 6.
BEGIN failed--compilation aborted at /tmp/packerbuild-1000/webmin/webmin/pkg/webmin/opt/webmin/run-postinstalls.pl line 6.

Offline

#17 2017-06-30 00:46:22

amish
Member
Registered: 2014-05-10
Posts: 470

Re: New Webmin install won't start. Error: PAM is mandatory.

There is something wrong with your perl (or module or packager) installation. But I dont know what.

Its clearly not able to locate required modules.

Why dont u try doing makepkg manually instead of using packer?

Also your @INC seems to be customized - that could be problem.

perl -e 'print  join (" ", @INC);

Last edited by amish (2017-06-30 00:47:31)

Offline

#18 2017-06-30 05:49:19

xer01ne
Member
Registered: 2011-02-28
Posts: 46

Re: New Webmin install won't start. Error: PAM is mandatory.

[root@banshee roberts]# perl -e 'print  join (" ", @INC)';
/home/roberts/perl5/lib/perl5/x86_64-linux-thread-multi /home/roberts/perl5/lib/perl5 /home/roberts/perl5/lib/perl5/x86_64-linux-thread-multi /home/roberts/perl5/lib/perl5 /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl

[root@banshee roberts]#

Offline

#19 2017-06-30 06:08:31

amish
Member
Registered: 2014-05-10
Posts: 470

Re: New Webmin install won't start. Error: PAM is mandatory.

Looks like you have customized some things (@INC) and hence for some reason Authen::PAM is not loading.

Does this file exist?
/usr/lib/perl5/vendor_perl/Authen/PAM.pm

But I am sorry that I can not help you anymore.

Its not webmin problem, clearly for some reason Authen::PAM is not loading.

Offline

#20 2017-07-01 16:06:19

xer01ne
Member
Registered: 2011-02-28
Posts: 46

Re: New Webmin install won't start. Error: PAM is mandatory.

Well, I did a fresh install and got webmin installed and working fine.  I'm not sure how old this install of arch was, but giving it a fresh install helped on more things then just webmin.  Thanks for your help amish. 

I do have a new issue, and I'm sure it's a simple one....
in my /etc/webmin/miniserv.conf

root is /opt/webmin

When I try to install modules or themes, I am getting a file not found error on the page and in the miniserv.error log, I am getting:

[01/Jul/2017:12:00:48 -0400] [192.168.86.88] /webmin/install_mod.cgi : File not found
[01/Jul/2017:12:00:58 -0400] miniserv.pl started
[01/Jul/2017:12:00:58 -0400] IPv6 support cannot be enabled without the Socket6 perl module
[01/Jul/2017:12:00:58 -0400] Using MD5 module Digest::MD5
[01/Jul/2017:12:00:58 -0400] PAM authentication enabled
[01/Jul/2017:12:01:17 -0400] [192.168.86.88] /webmin/install_mod.cgi : File not found

I'm not sure why it thinks that webmin files are located in /webmin and not in /opt/webmin.  Also, I tried to symlink /opt/webmin to /webmin and that didn't work.  Is this a known issue?

Offline

#21 2017-07-02 02:29:05

amish
Member
Registered: 2014-05-10
Posts: 470

Re: New Webmin install won't start. Error: PAM is mandatory.

Glad to know it worked finally.

Module installation is disabled. Because it updates all packaged files. And creates problem with future upgrades as pacman will start giving errors / warnings.

If you still want that feature, you can always edit PKGBUILD file of webmin and delete this line and then makepkg again:

rm {webmin,usermin}/{update.cgi,update.pl,update_sched.cgi,upgrade.cgi,edit_upgrade.cgi,install_mod.cgi,delete_mod.cgi,install_theme.cgi}

Note: I have not tested this. So it may create unexpected issues.

Last edited by amish (2017-07-02 02:29:57)

Offline

#22 2017-07-03 03:03:55

xer01ne
Member
Registered: 2011-02-28
Posts: 46

Re: New Webmin install won't start. Error: PAM is mandatory.

Amish,

That makes perfect sense!  I might actually just leave it alone and not install any modules.

Thanks again for the help, it was greatly appreciated.

Will

Offline

#23 2017-10-31 14:38:40

fuyushu
Member
Registered: 2007-05-27
Posts: 9

Re: New Webmin install won't start. Error: PAM is mandatory.

I've been got the output of information as below when run "systemctl status webmin.service", It seems to be running correctly except log.
but I can't access to " http://localhost:10000", is there somebody could help me?
-----------------------------------------------------------------------------------------------------------------
*****@**** /]$ systemctl status webmin.service
* webmin.service - Webmin
   Loaded: loaded (/usr/lib/systemd/system/webmin.service; enabled; vendor preset: disabled)
   Active: active (exited) since Tue 2017-10-31 22:05:39 CST; 23min ago
  Process: 284 ExecStart=/etc/webmin/start (code=exited, status=0/SUCCESS)
Main PID: 284 (code=exited, status=0/SUCCESS)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/webmin.service
           |- 452 /usr/bin/perl /opt/webmin/miniserv.pl /etc/webmin/miniserv.conf
           `-1917 /usr/bin/perl /opt/webmin/miniserv.pl /etc/webmin/miniserv.conf

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
---------------------------------------------------------------------------------

Last edited by fuyushu (2017-10-31 22:37:41)

Offline

#24 2017-11-01 08:51:06

amish
Member
Registered: 2014-05-10
Posts: 470

Re: New Webmin install won't start. Error: PAM is mandatory.

It should be https not http.

Also try https://127.0.0.1:10000

Offline

#25 2017-11-01 11:09:30

fuyushu
Member
Registered: 2007-05-27
Posts: 9

Re: New Webmin install won't start. Error: PAM is mandatory.

@amish
It works. thanks

Offline

Board footer

Powered by FluxBB