Pam_unix(sudo:auth): auth could not identify password for [amp]

OS Name/Version: ubuntu 22.04

Product Name/Version: (Always use the full version number - not ‘Latest’) ampinstmgr 2.3.2.4 built 22/02/2022

Problem Description: I cannot connect to ampinstmgr web interface (not active); ampinstmgr service does not start properly.

sudo systemctl status ampinstmgr
● ampinstmgr.service - AMP Instance Manager
     Loaded: loaded (/etc/systemd/system/ampinstmgr.service; enabled; vendor preset: enabled)
     Active: active (exited) since Sun 2022-03-13 11:33:58 EET; 1min 44s ago
       Docs: https://github.com/CubeCoders/AMP/wiki/AMP-systemd-script-(Linux)
    Process: 206358 ExecStart=/opt/cubecoders/amp/ampinstmgr startboot true (code=exited, status=0/SUCCESS)
   Main PID: 206358 (code=exited, status=0/SUCCESS)
      Tasks: 68 (limit: 76810)
     Memory: 346.1M
        CPU: 14.943s
     CGroup: /system.slice/ampinstmgr.service
             ├─206395 /usr/bin/tmux -f /dev/null new-session -s AMP_ADS01 -d "cd '/home/amp/.ampdata/instances/ADS01'; /home/amp/.ampdata/instances/ADS01/AMP_Linux_x86_64 +Core.Webserver.Port 8080 +Core.Webserver.IPBinding 0.0.0.0 +FileManagerPlugin.SFTP.SFTPPortN>
             ├─206396 /home/amp/.ampdata/instances/ADS01/AMP_Linux_x86_64 +Core.Webserver.Port 8080 +Core.Webserver.IPBinding 0.0.0.0 +FileManagerPlugin.SFTP.SFTPPortNumber 2223 +ADSModule.Network.MetricsServerPort 12820
             ├─206452 /home/amp/.ampdata/instances/MinecraftBedrock/AMP_Linux_x86_64 +Core.Webserver.Port 38082 +Core.Webserver.IPBinding 127.0.0.1 +FileManagerPlugin.SFTP.SFTPPortNumber 2224 +MinecraftModule.Minecraft.PortNumber 19132
             ├─206580 /home/amp/.ampdata/instances/MinecraftJavaSpigotbestseed1181/AMP_Linux_x86_64 +Core.Webserver.Port 38084 +Core.Webserver.IPBinding 127.0.0.1 +FileManagerPlugin.SFTP.SFTPPortNumber 2228 +MinecraftModule.Minecraft.PortNumber 25565
             └─206666 /home/amp/.ampdata/instances/MinecraftBedrock/./Minecraft/bedrock_server

mar 13 11:33:57 frubuntu ampinstmgr[206358]: [Notice] AMP instance ADS01 is now running.
mar 13 11:33:58 frubuntu ampinstmgr[206358]: [Info] Waiting for AMP instance to start...
mar 13 11:33:58 frubuntu ampinstmgr[206358]: [Notice] AMP instance MinecraftBedrock is now running.
mar 13 11:33:58 frubuntu ampinstmgr[206358]: [Info] Waiting for AMP instance to start...
mar 13 11:33:58 frubuntu ampinstmgr[206358]: [Notice] AMP instance MinecraftJavaSpigotbestseed1181 is now running.
mar 13 11:33:58 frubuntu systemd[1]: Finished AMP Instance Manager.
mar 13 11:33:58 frubuntu sudo[206609]: pam_unix(sudo:auth): conversation failed
mar 13 11:33:58 frubuntu sudo[206609]: pam_unix(sudo:auth): auth could not identify password for [amp]
mar 13 11:33:58 frubuntu sudo[206615]: pam_unix(sudo:auth): conversation failed
mar 13 11:33:58 frubuntu sudo[206615]: pam_unix(sudo:auth): auth could not identify password for [amp]

sudo tail -f /var/log/auth.log |grep amp
Mar 13 11:33:46 localhost sudo: fratzicu : TTY=pts/17 ; PWD=/etc/apache2/conf-available ; USER=root ; COMMAND=/usr/bin/systemctl restart ampinstmgr
Mar 13 11:33:57 localhost sudo: pam_unix(sudo:auth): auth could not identify password for [amp]
Mar 13 11:33:58 localhost sudo: pam_unix(sudo:auth): auth could not identify password for [amp]
Mar 13 11:33:58 localhost sudo: pam_unix(sudo:auth): auth could not identify password for [amp]

Steps to reproduce:

  • upgrade ampinstmgr
  • start ampinstmgr
  • try to connect to webinterface

Actions taken to resolve so far:

edited /etc/pam.d/sudo adding

auth       sufficient   pam_permit.so

edited visudo file adding

amp ALL=(ALL) NOPASSWD: /opt/cubecoders/amp/ampinstmgr, /usr/bin/bash

After this insystemctl status ampinstmgr it seems the amp user commands are allowed but service stops without relevant error message.

kind regards

AMP won’t try and start if it’s in sudoers. The logs there indicate everything was fine.

well, it’s not fine. because it doesn’t start if it is not in sudoers.

Try running ‘ampinstmgr fixperms’ as root.

hi, I tried

mar 13 22:17:01 frubuntu ampinstmgr[1769724]: [Notice] AMP instance ADS01 is now running.
mar 13 22:17:01 frubuntu ampinstmgr[1769724]: [Info] Waiting for AMP instance to start...
mar 13 22:17:01 frubuntu ampinstmgr[1769724]: [Notice] AMP instance MinecraftBedrock is now running.
mar 13 22:17:01 frubuntu ampinstmgr[1769724]: [Info] Waiting for AMP instance to start...
mar 13 22:17:01 frubuntu ampinstmgr[1769724]: [Notice] AMP instance MinecraftJavaSpigotbestseed1181 is now running.
mar 13 22:17:01 frubuntu systemd[1]: Finished AMP Instance Manager.
mar 13 22:17:01 frubuntu sudo[1769981]: pam_unix(sudo:auth): conversation failed
mar 13 22:17:01 frubuntu sudo[1769981]: pam_unix(sudo:auth): auth could not identify password for [amp]
mar 13 22:17:01 frubuntu sudo[1769987]: pam_unix(sudo:auth): conversation failed
mar 13 22:17:01 frubuntu sudo[1769987]: pam_unix(sudo:auth): auth could not identify password for [amp]

Still no luck.

I’ll wait, maybe it will come some fix; otherwise maybe I should reinstall from scratch. This error appeared after upgrading to xubuntu 22.04 development and this upraded to php 8.1 so maybe this is the cause.