OMV5 - update authentication failed / Incorrect username or password.

  • Hi,


    I was running an update when part way through the process a red message popped up and asked me to re-authenticate. When I re-entered my password I got the following:


    Incorrect username or password.

    Error #0:
    OMV\HttpErrorException: Incorrect username or password. in /var/www/openmediavault/rpc/session.inc:151
    Stack trace:
    #0 [internal function]: OMVRpcServiceSession->login(Array, Array)
    #1 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
    #2 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('login', Array, Array)
    #3 /usr/share/php/openmediavault/rpc/proxy/json.inc(97): OMV\Rpc\Rpc::call('Session', 'login', Array, Array, 3)
    #4 /var/www/openmediavault/rpc.php(45): OMV\Rpc\Proxy\Json->handle()
    #5 {main}


    Can someone please help me resolve this?

  • The usual way to reset password is omv-firstaid from the cli.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Thanks.


    Tried that and I get the following without the password changing:

    Updating control panel administrator password. Please wait ...

    {'response': None, 'error': {'code': 0, 'message': "Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; chpasswd </tmp/WKYqQU' with exit code '1': ", 'trace': "OMV\\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; chpasswd </tmp/WKYqQU' with exit code '1': in /usr/share/php/openmediavault/system/process.inc:196\nStack trace:\n#0 /usr/share/php/openmediavault/system/user.inc(377): OMV\\System\\Process->execute()\n#1 /usr/share/openmediavault/engined/rpc/usermgmt.inc(1165): OMV\\System\\User->changePassword('Entr0py1964')\n#2 [internal function]: Engined\\Rpc\\UserMgmt->setPasswordByContext(Array, Array)\n#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)\n#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\\Rpc\\ServiceAbstract->callMethod('setPasswordByCo...', Array, Array)\n#5 /usr/sbin/omv-engined(537): OMV\\Rpc\\Rpc::call('UserMgmt', 'setPasswordByCo...', Array, Array, 1)\n#6 {main}", 'http_status_code': 500}}

    ERROR: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; chpasswd </tmp/WKYqQU' with exit code '1':

  • I don't know what has been in the update, but debian was changing something with pam_tally.

    can you try to change the password on the cli manually:

    passwd <username> and post the error.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • OK, not the one I hoped for, but stil lan indication of wrong pam settings.


    please psot the output of cat /etc/pam.com and ls -lah /etc/pam.d and cat /etc/pam.d/openmediavault*


    Did you try an update or a version upgrade when this happened?

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Hi,


    Results below. OMV was running an update of the following packages via the web interface:

    Code
    base-files chrony libc-bin libc-l10n libc6 libcups2 libgmp10 libicu63  libssl1.1 libxml2 locales openssl rsyslog tzdata vim-common vim-tiny xxd


    cat: /etc/pam.com: No such file or directory


    ls -lah /etc/pam.d

    total 116K

    drwxr-xr-x 2 root root 4.0K Mar 3 17:07 .

    drwxrwxr-x 96 root root 4.0K Mar 28 08:31 ..

    -rw-r--r-- 1 root root 384 Sep 27 2017 chfn

    -rw-r--r-- 1 root root 92 Sep 27 2017 chpasswd

    -rw-r--r-- 1 root root 581 Sep 27 2017 chsh

    -rw-r--r-- 1 root root 1.2K Sep 21 2020 common-account

    -rw-r--r-- 1 root root 1.2K Sep 21 2020 common-auth

    -rw-r--r-- 1 root root 1.5K Sep 21 2020 common-password

    -rw-r--r-- 1 root root 1.2K Sep 21 2020 common-session

    -rw-r--r-- 1 root root 1.2K Sep 21 2020 common-session-noninteractive

    -rw-r--r-- 1 root root 606 Oct 11 2019 cron

    -rw-r--r-- 1 root root 4.9K Jul 27 2018 login

    -rw-r--r-- 1 root root 100 Jul 7 2019 monit

    -rw-r--r-- 1 root root 92 Sep 27 2017 newusers

    -rw-r--r-- 1 root root 354 Apr 24 2019 openmediavault

    -rw-r--r-- 1 root root 186 Apr 24 2019 openmediavault-common-auth

    -rw-r--r-- 1 root root 365 Apr 24 2019 openmediavault-webgui

    -rw-r--r-- 1 root root 520 Feb 14 2019 other

    -rw-r--r-- 1 root root 92 Sep 27 2017 passwd

    -rw-r--r-- 1 root root 385 Mar 10 2020 proftpd

    -rw-r--r-- 1 root root 143 Jan 10 2019 runuser

    -rw-r--r-- 1 root root 138 Jan 10 2019 runuser-l

    -rw-r--r-- 1 root root 84 Sep 2 2019 samba

    -rw-r--r-- 1 root root 2.1K Jan 31 2020 sshd

    -rw-r--r-- 1 root root 2.3K Jan 10 2019 su

    -rw-r--r-- 1 root root 95 Feb 2 2020 sudo

    -rw-r--r-- 1 root root 137 Jan 10 2019 su-l

    -rw-r--r-- 1 root root 317 Apr 27 2020 systemd-user


    cat /etc/pam.d/openmediavault*

    #

    # The PAM configuration file for openmediavault.

    #


    # openmediavault standard authentication.

    @include openmediavault-common-auth


    # Standard Un*x authentication.

    @include common-auth


    account required pam_tally2.so


    # Standard Un*x authorization.

    @include common-account


    # Standard Un*x session setup and teardown.

    @include common-session

    #

    # The PAM configuration file for openmediavault.

    #


    # Deny user access after 3 failed login attempts.

    auth required pam_tally2.so onerr=fail audit deny=3 unlock_time=180

    #

    # The PAM configuration file for the openmediavault WebGUI.

    #


    # openmediavault standard authentication.

    @include openmediavault-common-auth


    # Standard Un*x authentication.

    @include common-auth


    account required pam_tally2.so


    # Standard Un*x authorization.

    @include common-account


    # Standard Un*x session setup and teardown.

    @include common-session

  • It is cat /etc/pam.conf


    You did not answer this question:
    Did you try an update or a version upgrade when this happened?

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Hi Zoki,


    As above, it was an automatic update via the OMV web update, which was modifying the modules noted in my previous post.



    cat /etc/pam.conf

    # ---------------------------------------------------------------------------#

    # /etc/pam.conf #

    # ---------------------------------------------------------------------------#

    #

    # NOTE

    # ----

    #

    # NOTE: Most program use a file under the /etc/pam.d/ directory to setup their

    # PAM service modules. This file is used only if that directory does not exist.

    # ---------------------------------------------------------------------------#


    # Format:

    # serv. module ctrl module [path] ...[args..] #

    # name type flag #

  • In the packages is nothing, which is directly related to login.


    May I assume, the trivial things are checked:

    - you checked the password you used for passwd was correct

    - there is enough disk space on /

    - / is mounted rw

    - /etc/shadown has permissions 640


    There is pam-auth-update, but I do not know is it works well with omv settings.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • - you checked the password you used for passwd was correct - yes, it was

    - there is enough disk space on / - yes, plenty of free space ~40Gb

    - / is mounted rw - how do I check this? (forgive me, I'm not good at Linux)

    - /etc/shadown has permissions 640 - I do not have 'shadown' in /etc

  • Thanks


    /etc/shadow has 640 permissions


    grep 'ro' /proc/mounts:

    proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0

    /dev/sdf1 / ext4 ro,relatime,errors=remount-ro 0 0

    tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0

    cgroup2 /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0

    cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0

    cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0

    cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0

    cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0

    cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0

    cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0

    cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0

    cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0

    cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0

    cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0

    cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0

    cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0

    systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=37,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=10946 0 0

    /dev/sde1 /srv/dev-disk-by-label-NASDISK05 ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0

    /dev/sdd1 /srv/dev-disk-by-label-NASDISK04 ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0

    /dev/sda1 /srv/dev-disk-by-label-NASDISK02 ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0

    /dev/sda1 /export/NAS02 ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0

    /dev/sdc1 /srv/dev-disk-by-label-NASDISK03 ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0

    /dev/sdd1 /export/NAS04 ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0

    /dev/sde1 /export/NAS05 ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0

    /dev/sdc1 /export/NAS03 ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0

    /dev/sdb1 /srv/dev-disk-by-label-NASDISK1 ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0

    /dev/sdb1 /export/NAS01 ext4 rw,relatime,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group 0 0

  • your os disk is mounted read only.

    You can try if a file system check resolves it.


    sudo touch /forcefsck


    And then reboot

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • OK, stupid me! This only works if you can write to the file system.


    Try the simple thing: Remount the os as rw


    mount -o rw,remount /

    If this does not work, you will have to reboot and see, if it is self-healing.

    Otherwise you will have to boot a live Linux and check the disk.

    Or even better: You have a backup boot disk?

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • mount -o rw,remount /

    mount: /: cannot remount /dev/sdf1 read-write, is write-protected.


    Tried reboot but unfortunately system will not boot. I need to attach a screen and see what's going on (it's currently headless).

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!