NCP 1.50.3: curl fresh install fails - user "pi" is missing

After I had some WebDAV issues I tried to do a fresh install.
I wiped the card and installed fresh Raspbian (edit: a 32-bit version via the official imager), then started the curl install script.
curl -sSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh | sudo bash
That is what worked nicely for me before.

But today the script simply fails somewhere in the middle.

Here is the end of the screen output:


Running newaliases
Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service ? /lib/systemd/system/postfix.service.
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for rsyslog (8.2102.0-2+deb11u1) ...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  liblua5.1-0 liblzf1 lua-bitop lua-cjson redis-tools
Suggested packages:
  ruby-redis
The following NEW packages will be installed:
  liblua5.1-0 liblzf1 lua-bitop lua-cjson redis-server redis-tools
0 upgraded, 6 newly installed, 0 to remove and 4 not upgraded.
Need to get 802 kB of archives.
After this operation, 3,417 kB of additional disk space will be used.
Get:1 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf liblua5.1-0 armhf 5.1.5-8.1+b2 [82.8 kB]
Get:2 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian bullseye/main armhf liblzf1 armhf 3.6-3 [9,268 B]
Get:3 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian bullseye/main armhf lua-bitop armhf 1.0.2-5 [6,496 B]
Get:4 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf lua-cjson armhf 2.1.0+dfsg-2.1 [15.2 kB]
Get:5 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf redis-tools armhf 5:6.0.16-1+deb11u2 [590 kB]
Get:6 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf redis-server armhf 5:6.0.16-1+deb11u2 [98.2 kB]
Fetched 802 kB in 1s (634 kB/s)        
Selecting previously unselected package liblua5.1-0:armhf.
(Reading database ... 108148 files and directories currently installed.)
Preparing to unpack .../0-liblua5.1-0_5.1.5-8.1+b2_armhf.deb ...
Unpacking liblua5.1-0:armhf (5.1.5-8.1+b2) ...
Selecting previously unselected package liblzf1:armhf.
Preparing to unpack .../1-liblzf1_3.6-3_armhf.deb ...
Unpacking liblzf1:armhf (3.6-3) ...
Selecting previously unselected package lua-bitop:armhf.
Preparing to unpack .../2-lua-bitop_1.0.2-5_armhf.deb ...
Unpacking lua-bitop:armhf (1.0.2-5) ...
Selecting previously unselected package lua-cjson:armhf.
Preparing to unpack .../3-lua-cjson_2.1.0+dfsg-2.1_armhf.deb ...
Unpacking lua-cjson:armhf (2.1.0+dfsg-2.1) ...
Selecting previously unselected package redis-tools.
Preparing to unpack .../4-redis-tools_5%3a6.0.16-1+deb11u2_armhf.deb ...
Unpacking redis-tools (5:6.0.16-1+deb11u2) ...
Selecting previously unselected package redis-server.
Preparing to unpack .../5-redis-server_5%3a6.0.16-1+deb11u2_armhf.deb ...
Unpacking redis-server (5:6.0.16-1+deb11u2) ...
Setting up lua-cjson:armhf (2.1.0+dfsg-2.1) ...
Setting up liblzf1:armhf (3.6-3) ...
Setting up lua-bitop:armhf (1.0.2-5) ...
Setting up liblua5.1-0:armhf (5.1.5-8.1+b2) ...
Setting up redis-tools (5:6.0.16-1+deb11u2) ...
Setting up redis-server (5:6.0.16-1+deb11u2) ...
Created symlink /etc/systemd/system/redis.service ? /lib/systemd/system/redis-server.service.
Created symlink /etc/systemd/system/multi-user.target.wants/redis-server.service ? /lib/systemd/system/redis-server.service.
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u4) ...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  php8.1-igbinary
The following NEW packages will be installed:
  php8.1-igbinary php8.1-redis
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 260 kB of archives.
After this operation, 756 kB of additional disk space will be used.
Get:1 https://packages.sury.org/php bullseye/main armhf php8.1-igbinary armhf 3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e [127 kB]
Get:2 https://packages.sury.org/php bullseye/main armhf php8.1-redis armhf 5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7 [133 kB]
Fetched 260 kB in 1s (414 kB/s)   
Selecting previously unselected package php8.1-igbinary.
(Reading database ... 108230 files and directories currently installed.)
Preparing to unpack .../php8.1-igbinary_3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e_armhf.deb ...
Unpacking php8.1-igbinary (3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e) ...
Selecting previously unselected package php8.1-redis.
Preparing to unpack .../php8.1-redis_5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7_armhf.deb ...
Unpacking php8.1-redis (5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7) ...
Setting up php8.1-igbinary (3.2.6+2.0.8-6+0~20220131.33+debian11~1.gbp1d540e) ...
Setting up php8.1-redis (5.3.7+4.3.0-1+0~20220330.42+debian11~1.gbp6fe8b7) ...
Processing triggers for php8.1-cli (8.1.11-1+0~20220929.27+debian11~1.gbpe414ce) ...
Processing triggers for php8.1-fpm (8.1.11-1+0~20220929.27+debian11~1.gbpe414ce) ...
NOTICE: Not enabling PHP 8.1 FPM by default.
NOTICE: To enable PHP 8.1 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php8.1-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
PHP Warning:  include(/var/www/nextcloud/config/config.php): Failed to open stream: No such file or directory in Command line code on line 1
PHP Warning:  include(): Failed opening '/var/www/nextcloud/config/config.php' for inclusion (include_path='.:/usr/share/php') in Command line code on line 1
PHP Warning:  Undefined variable $CONFIG in Command line code on line 1
PHP Warning:  Trying to access array offset on value of type null in Command line code on line 1
Created symlink /etc/systemd/system/multi-user.target.wants/nc-provisioning.service ? /lib/systemd/system/nc-provisioning.service.
Running nc-nextcloud
Downloading Nextcloud 24.0.5...
Installing  Nextcloud 24.0.5...
Creating possible missing Directories
chmod Files and Directories
chown Directories
chmod/chown .htaccess
INFO: Restoring template to default settings
Setting up database...
Setting up Apache...
INFO: Metrics enabled: no
Enabling site nextcloud.
To activate the new configuration, you need to run:
  systemctl reload apache2
Module proxy already enabled
Considering dependency proxy for proxy_http:
Module proxy already enabled
Enabling module proxy_http.
Considering dependency proxy for proxy_wstunnel:
Module proxy already enabled
Enabling module proxy_wstunnel.
To activate the new configuration, you need to run:
  systemctl restart apache2
Created symlink /etc/systemd/system/multi-user.target.wants/notify_push.service ? /etc/systemd/system/notify_push.service.
Setting up system...
Don't forget to run nc-init
Installing ncp
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease                              
Hit:2 https://packages.sury.org/php bullseye InRelease                                      
Get:3 http://raspbian.raspberrypi.org/raspbian bullseye InRelease [15.0 kB]
Fetched 15.0 kB in 6s (2,531 B/s)  
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
file is already the newest version (1:5.39-3).
git is already the newest version (1:2.30.2-1).
jq is already the newest version (1.6-2.1).
lsb-release is already the newest version (11.1.0+rpi1).
whiptail is already the newest version (0.52.21-4+b2).
whiptail set to manually installed.
The following NEW packages will be installed:
  dialog
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 252 kB of archives.
After this operation, 1,020 kB of additional disk space will be used.
Get:1 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian bullseye/main armhf dialog armhf 1.3-20201126-1 [252 kB]
Fetched 252 kB in 1s (288 kB/s)
Selecting previously unselected package dialog.
(Reading database ... 108250 files and directories currently installed.)
Preparing to unpack .../dialog_1.3-20201126-1_armhf.deb ...
Unpacking dialog (1.3-20201126-1) ...
Setting up dialog (1.3-20201126-1) ...
Processing triggers for man-db (2.9.4-2) ...
**usermod: user 'pi' does not exist**

I now tried with 64bit Raspbian, sadly same bugs.

End of screen output:



Setting up system...
Don't forget to run nc-init
Installing ncp
OK:1 http://deb.debian.org/debian bullseye InRelease
OK:2 http://deb.debian.org/debian bullseye-updates InRelease                                                          
OK:3 http://security.debian.org/debian-security bullseye-security InRelease                                           
OK:4 https://packages.sury.org/php bullseye InRelease                                                                 
OK:5 http://archive.raspberrypi.org/debian bullseye InRelease                                 
Paketlisten werden gelesen... Fertig       
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut... Fertig
Statusinformationen werden eingelesen... Fertig
file ist schon die neueste Version (1:5.39-3).
git ist schon die neueste Version (1:2.30.2-1).
jq ist schon die neueste Version (1.6-2.1).
lsb-release ist schon die neueste Version (11.1.0).
whiptail ist schon die neueste Version (0.52.21-4+b3).
Die folgenden NEUEN Pakete werden installiert:
  dialog
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 4 nicht aktualisiert.
Es müssen 276 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 1.225 kB Plattenplatz zusätzlich benutzt.
Holen:1 http://deb.debian.org/debian bullseye/main arm64 dialog arm64 1.3-20201126-1 [276 kB]
Es wurden 276 kB in 0 s geholt (1.185 kB/s).
Vormals nicht ausgewähltes Paket dialog wird gewählt.
(Lese Datenbank ... 98708 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../dialog_1.3-20201126-1_arm64.deb ...
Entpacken von dialog (1.3-20201126-1) ...
dialog (1.3-20201126-1) wird eingerichtet ...
Trigger für man-db (2.9.4-2) werden verarbeitet ...
usermod: Benutzer »pi« ist nicht vorhanden.

@Gorf Could you try the official NextcloudPi-Image, that you get from here?
It’s based on the official raspbian image and already has NCP preinstalled.

I have now reinstalled NCP via the image you mentioned. Overall something works now, but lots of hickups:

  1. Web Panel access sometime ended working while I was using the Panel, asking over and over again for user and password, so I could not get into it again.
    I guess it has something to do with me activating SSH access. There I had to enter a password for ncp SSH access.
    I finally tested the SSH password for user “ncp” to get into the web panel and it now works. I as noob was not aware of the connection between SSH password and web panel password.

  2. Now that I have sucessfully SSH’d into the raspi I see two weird things. maybe someone can tell me what to do about it.
    2a) It says

NextCloudPi v1.50.3 is up to date
Last login: Wed Oct 12 14:44:16 2022 from 192.168.178.37
Could not chdir to home directory /nonexistent: No such file or directory
SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

How do I change the “pi” password? I thought I had read that there is no more “pi” user and it is only the “ncp” one.
2b) Then I get the following:

Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.
ncp@nextcloudpi:/$ raspi-config
Script must be run as root. Try 'sudo raspi-config'
ncp@nextcloudpi:/$ sudo raspi-config
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.
[sudo] password for ncp:
ncp is not in the sudoers file.  This incident will be reported.

So I’d really like to do a “sudo raspi-config” as expected, but I have no idea how to get around this “not in the list of sudoers file”. I did assume the user “ncp” has full admin rights.
Ideas?

  1. System info now tells me:
    |HPB service|down|
    Any ideas here?

You have to login with the user pi.

Can you please be very explicit?
Login with the user pi where and how?
From where would I know the password of the user pi?
When I installed and activated NCP everything was about the panel user ncp and the NC user ncp only.
As far as I can tell the only user that allows to access the raspi via SSH is the user ncp as well.

You have to login via SSH, user pi password raspberry. The normal raspberry pi login. You will then be prompted to change the password.

Thanks.

I entered: “ssh pi@192.168.178.xxx” and the password.

All I get then is:

“This account is currently not available.
Connection to 192.168.178.xxx closed.”

When I try the same with user “Pi” instead of “pi” I get the response:
“Permission denied, please try again.”

Do you have the same issue with direct access to the terminal via screen?

I just tried directly with keyboard/screen attached to the raspberry.

First I stumbled over the English keyboard assignment for the “y” at the end of “raspberry” (I have a German keyboard layout).

Second I encountered the requirement that obviously the raspi does need a LAN connection to the internet when doing so. Without LAN I got an error "Fatal: unable to access ‘GitHub - nextcloud/nextcloudpi: 📦 Build code for NextcloudPi: Raspberry Pi, Odroid, Rock64, Docker, curl installer...’ : could not resolve host: github.com.
The git clone command failed: No connectivity to https://github.com
grep: /var/run/.ncp-latest-version: no such file or directrory

Thirdly with LAN then I again get “This account is currently not available.”

I do believe there is some major bug in this version as the non-existence of the admin user “pi” causes issues now and this also was the reason why the curl installscript failed.

Now that it seems that there is no user “pi” on this NCP installation I do wonder how most seems to run well.
Wouldn’t it imply that somewhere there must be a working admin user?
Is there a way to find out which admin user is there?
Is it possible to create the admin user “pi” now?

Currently I seem to be locked out from doing many things as I don’t seem to have any root access means.

I ran into the same issues while doing a clean install - but found following workaround:

Instead of using the user “ncp” (showing up as default) enter the user “pi” here.

Doing this allows you to set a new password for user pi.

Afterwards you can SSH to the raspi with user pi.
During your first logon you’ll have to change the password once more (and will be logged off automatically after having changed the password).

Finally you can now SSH with user pi without any issues - plus - you can use sudo.

1 Like

Thanks you very much, schoetju!

That worked for me as well. Now I can use the “pi” user with admin privileges.