Can't change password for nextcloudpi panel

Nextcloud version (eg, 12.0.2): 13.0.0
NextCloudPi configuration ver. v0.46.3
Operating system and version (eg, Ubuntu 17.04): PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
Apache or nginx version (eg, Apache 2.4.25): Server version: Apache/2.4.25 (Raspbian)
PHP version (eg, 7.1): PHP 7.0.27-0+deb9u1 (cli) (built: Jan 5 2018 13:51:52) ( NTS )

The issue you are facing:

Tried to change the nextcloudpi web UI password using ncp-config. I got:
Launching nc-passwd
passwords do not match
Done. Press any keyā€¦

Iā€™ve mafe sure the passwords are definitely the same, and it doesnā€™t matter whether they are all alpha, alphanumeric or have special characters, or how long they are.

Is this the first time youā€™ve seen this error? (Y/N): Y

Iā€™ve recently upgraded to NC13, but donā€™t know when the problem started as I usually use the cli.

I just tested it and it works for me. Anybody else?

Hi nachoparker
Iā€™ve just started investigating this problem further. Although I have ncp-autoupdate-ncp ticked I found it wasnā€™t being updated. I forced it to update, which it did to v0.53.0, and then I restarted the pi ā€œsudo shutdown -r nowā€. ncp then wanted to update to v0.53.1, which I allowed. It gave an error message before completing:

  • chsh: user ā€˜ncpā€™ does not exist
  • NextCloudPi updated to version v0.53.1

Iā€™m not sure what to do next, so any insight would be appreciated.

Sorry - finger trouble.

Can I just add a ncp user to the pi?

smells like a very old non up to date image

can we get the output of

sudo ncp-report

All Iā€™m getting is:

<ā€“! Paste this in GitHub report -->

NextCloudPi diagnostics

and the command never completes

give it a couple minutes

OK - the pi hung and I had to reboot, but here it is:

NextCloudPi diagnostics

NextCloudPi version  v0.53.1
NextCloudPi image    untagged
distribution         Raspbian GNU/Linux 9 \n \l
automount            no
USB devices          sda sdb sdc 
datadir              /media/ncDrive/ncdata
data in SD           no
data filesystem      ext2/ext3
data disk usage      19G/811G
rootfs usage         6.9G/15G
swapfile             /var/swap
Nextcloud check      ok
Nextcloud version    13.0.0.14
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
Postfix service      up
internet check       ok
port check 80        open
port check 443       open
IP                   192.168.1.6
gateway              192.168.1.1
interface            eth0
certificates         nc.sohaila.org.uk 
certs due            65 days 
NAT loopback         no
uptime               8min

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "192.168.1.6",
            "nc.sohaila.org.uk",
            "www.sohaila.org.uk",
            "nc.sohaila.org.uk"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nc.sohaila.org.uk",
        "dbtype": "mysql",
        "version": "13.0.0.14",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "loglevel": "2",
        "log_type": "file",
        "logfile": "\/var\/www\/nextcloud\/data\/nextcloud.log",
        "maintenance": false,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "PLAIN",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        }
    }
}

HTTPd logs

[Sat Mar 17 11:16:12.679304 2018] [authz_host:error] [pid 12784:tid 1723913264] [client 192.168.1.113:52520] AH01753: access check of 'localhost' to / failed, reason: unable to get the remote host name
[Sat Mar 17 11:16:12.707354 2018] [authnz_external:error] [pid 12784:tid 1723913264] [client 192.168.1.113:52520] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (1) for user ncp
[Sat Mar 17 11:16:12.707503 2018] [auth_basic:error] [pid 12784:tid 1723913264] [client 192.168.1.113:52520] AH01617: user ncp: authentication failure for "/": Password Mismatch
[Sat Mar 17 11:16:25.697041 2018] [authz_host:error] [pid 12784:tid 1925239856] [client 192.168.1.113:52521] AH01753: access check of 'localhost' to / failed, reason: unable to get the remote host name
[Sat Mar 17 11:16:25.719716 2018] [authnz_external:error] [pid 12784:tid 1925239856] [client 192.168.1.113:52521] AuthExtern pwauth [/usr/sbin/pwauth]: Failed (1) for user ncp
[Sat Mar 17 11:16:25.719866 2018] [auth_basic:error] [pid 12784:tid 1925239856] [client 192.168.1.113:52521] AH01617: user ncp: authentication failure for "/": Password Mismatch
[Sat Mar 17 11:42:04.295079 2018] [mpm_event:notice] [pid 1218:tid 1992404992] AH00491: caught SIGTERM, shutting down
[Sat Mar 17 17:58:11.598793 2018] [ssl:warn] [pid 837:tid 1992871936] AH01909: 127.0.1.1:4443:0 server certificate does NOT include an ID which matches the server name
[Sat Mar 17 17:58:12.000446 2018] [:notice] [pid 837:tid 1992871936] ModSecurity for Apache/2.9.1 (http://www.modsecurity.org/) configured.
[Sat Mar 17 17:58:12.000510 2018] [:notice] [pid 837:tid 1992871936] ModSecurity: APR compiled version="1.5.2"; loaded version="1.5.2"
[Sat Mar 17 17:58:12.000525 2018] [:notice] [pid 837:tid 1992871936] ModSecurity: PCRE compiled version="8.39 "; loaded version="8.39 2016-06-14"
[Sat Mar 17 17:58:12.000535 2018] [:notice] [pid 837:tid 1992871936] ModSecurity: LUA compiled version="Lua 5.1"
[Sat Mar 17 17:58:12.000604 2018] [:notice] [pid 837:tid 1992871936] ModSecurity: YAJL compiled version="2.1.0"
[Sat Mar 17 17:58:12.000617 2018] [:notice] [pid 837:tid 1992871936] ModSecurity: LIBXML compiled version="2.9.4"
[Sat Mar 17 17:58:12.000627 2018] [:notice] [pid 837:tid 1992871936] ModSecurity: Original server signature: Apache
[Sat Mar 17 17:58:12.000753 2018] [:notice] [pid 837:tid 1992871936] ModSecurity: StatusEngine call: "2.9.1,Apache,1.5.2/1.5.2,8.39/8.39 2016-06-14,Lua 5.1,2.9.4,d6"
[Sat Mar 17 17:58:12.199570 2018] [:notice] [pid 837:tid 1992871936] ModSecurity: StatusEngine call successfully sent. For more information visit: http://status.modsecurity.org/
[Sat Mar 17 17:58:12.498341 2018] [ssl:warn] [pid 1165:tid 1992871936] AH01909: 127.0.1.1:4443:0 server certificate does NOT include an ID which matches the server name
[Sat Mar 17 17:58:13.606548 2018] [mpm_event:notice] [pid 1165:tid 1992871936] AH00489: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l   configured -- resuming normal operations
[Sat Mar 17 17:58:13.606764 2018] [core:notice] [pid 1165:tid 1992871936] AH00094: Command line: '/usr/sbin/apache2'

Database logs

2018-03-17 18:35:58 1988870144 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-03-17 18:35:58 1988870144 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-03-17 18:35:58 1988870144 [Note] InnoDB: Using Linux native AIO
2018-03-17 18:35:58 1988870144 [Note] InnoDB: Using generic crc32 instructions
2018-03-17 18:35:58 1988870144 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2018-03-17 18:35:58 1988870144 [Note] InnoDB: Completed initialization of buffer pool
2018-03-17 18:35:59 1988870144 [Note] InnoDB: Highest supported file format is Barracuda.
2018-03-17 18:35:59 1988870144 [Note] InnoDB: The log sequence numbers 1173202283 and 1173202283 in ibdata files do not match the log sequence number 1175712814 in the ib_logfiles!
2018-03-17 18:35:59 1988870144 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
2018-03-17 18:36:00 1988870144 [Note] InnoDB: 128 rollback segment(s) are active.
2018-03-17 18:36:00 1988870144 [Note] InnoDB: Waiting for purge to start
2018-03-17 18:36:00 1988870144 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 1175712814
2018-03-17 18:36:00 1442837312 [Note] InnoDB: Dumping buffer pool(s) not yet started
2018-03-17 18:36:00 1988870144 [Note] Plugin 'FEEDBACK' is disabled.
2018-03-17 18:36:00 1988870144 [Note] Recovering after a crash using tc.log
2018-03-17 18:36:00 1988870144 [Note] Starting crash recovery...
2018-03-17 18:36:00 1988870144 [Note] Crash recovery finished.
2018-03-17 18:36:00 1988870144 [Note] Server socket created on IP: '127.0.0.1'.
2018-03-17 18:36:00 1988870144 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.23-MariaDB-9+deb9u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Raspbian 9.0

Nextcloud logs

{"reqId":"6433Vnu8l7M4FNuwgqJ4","level":4,"time":"2017-08-20T10:02:09+00:00","remoteAddr":"","user":"--","app":"cron","method":"--","url":"--","message":"Not installed","userAgent":"--","version":""}
{"reqId":"Q5XjAupOfVTJ4gVeC5qK","level":3,"time":"2017-09-04T11:01:52+00:00","remoteAddr":"192.168.1.113","user":"admin","app":"PHP","method":"MOVE","url":"\/remote.php\/webdav\/audi_policy.pdf","message":"Undefined offset: 3 at \/var\/www\/nextcloud\/apps\/activity\/lib\/FilesHooks.php#620","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko\/20100101 Firefox\/55.0","version":"12.0.2.0"}
{"reqId":"WCy7CBZo25rowXiSrp2X","level":3,"time":"2017-09-04T11:01:52+00:00","remoteAddr":"192.168.1.113","user":"admin","app":"PHP","method":"MOVE","url":"\/remote.php\/webdav\/Documents","message":"Undefined offset: 3 at \/var\/www\/nextcloud\/apps\/activity\/lib\/FilesHooks.php#620","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko\/20100101 Firefox\/55.0","version":"12.0.2.0"}
{"reqId":"R91sPqDH0yg7b1bSDmO4","level":3,"time":"2017-09-04T11:05:56+00:00","remoteAddr":"192.168.1.113","user":"admin","app":"PHP","method":"MOVE","url":"\/remote.php\/webdav\/Photos\/Documents","message":"Undefined offset: 3 at \/var\/www\/nextcloud\/apps\/activity\/lib\/FilesHooks.php#620","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko\/20100101 Firefox\/55.0","version":"12.0.2.0"}
{"reqId":"Z8KINFOXbDJO3YekFYY0","level":3,"time":"2017-09-04T11:05:56+00:00","remoteAddr":"192.168.1.113","user":"admin","app":"PHP","method":"MOVE","url":"\/remote.php\/webdav\/Photos\/Coast.jpg","message":"Undefined offset: 3 at \/var\/www\/nextcloud\/apps\/activity\/lib\/FilesHooks.php#620","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko\/20100101 Firefox\/55.0","version":"12.0.2.0"}
{"reqId":"0sGZURLOvdDJpYETgLxt","level":3,"time":"2017-09-04T11:07:53+00:00","remoteAddr":"192.168.1.113","user":"admin","app":"PHP","method":"MOVE","url":"\/remote.php\/webdav\/Coast.jpg","message":"Undefined offset: 3 at \/var\/www\/nextcloud\/apps\/activity\/lib\/FilesHooks.php#620","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko\/20100101 Firefox\/55.0","version":"12.0.2.0"}
{"reqId":"lbywRkRIekDEYroDFr7m","level":2,"time":"2017-09-04T13:02:49+00:00","remoteAddr":"139.162.116.133","user":"--","app":"core","method":"GET","url":"\/","message":"Trusted domain error. \"139.162.116.133\" tried to access using \"81.174.154.199\" as host.","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/50.0.2661.102 Safari\/537.36","version":"12.0.2.0"}

Yes, you have a very old image and probably missed some updates

You can certainly do this

useradd --home-dir /nonexistent ncp
passwd ncp
chsh -s /usr/sbin/nologin ncp

But I recommend that you backup your instance and restore it in the latest image, also run the wizard or at least activate autoupdates so you wonā€™t be in the same situation again.

This guide might be useful

Hi nachoparker. Thanks for that, and sorry about not getting back to you sooner - Iā€™ve had a flu-like illness for the last 4 days, and have only just got around to sorting this out.

I did a backup as suggested, though I had an auto-backup one that was only a couple of days old anyway, then added the ncp user. ncp-passwd now works, but the login is rejected. I will therefore try reinstalling the nextcloudpi image from scratch and restoring the config. Iā€™ll leave that till tomorrow.

Got the same
Nextcloud version (eg, 18.0.3) :
NextCloudPi configuration ver. v0.46.3

Apache or nginx version (eg, Apache 2.4.25) : Server version: Apache/2.4.25 (Raspbian)
PHP version (eg, 7.1) : PHP 7.0.27-0+deb9u1
The issue you are facing:

Tried to change the nextcloudpi web UI password using ncp-config. I got:
Launching nc-passwd
passwords do not match
Done. Press any keyā€¦

After sudo systctl restart apache2
sudo reboot

And i cann not log in on web-ncp:4443 Panel
What can i do now?

If passwords dont match, it will not be changed.

Also do not use single and double quotes as mentioned in the FAQ

Sorry my mistake!!
Thatā€™s exactly what I did as in the photos below:

SSH00

SSH

Then after pi reboots and i try to log in to the web-ui:4443 like this next photo below:

SSH0

The password is that what I updated recentlyā€¦
After I press enter I come back to the photo below:

SSH1

What am I doing wrong, why canā€™t I change the password?

Weird, maybe check your Caps/lock or keyboard settings, make sure no letters with accents are usedā€¦
Reloading webserver and reboot are not required, the new password should take affect immediatly.

But I see the password when I enter it! See photo below! Then I go to start and leave ncp-config ā€¦ I cannot log in with password: ABCDabcd12345

SSH2

Very strange.
When you return to nc-passwd, is the new password still there?
Iā€™d check ncp.log and maybe dmesg. Might reveal what is going wrong.

No is not!
Everything is empty there again !

Even when I start to change it is empty thereā€¦

sudo dmesg
sudo tail /var/log/ncp.log
sudo ncp-report

I usually post log content via pastebin.

Can you give me a link on how I post on Pastebin?

upā€¦

No problem, Iā€™ll find outā€¦

One moment please!

ncp-log:
ncp-log

ncp-report:
ncp-report

dmesg:
dmesg