Nextcloudpi - SSH Enable not working Probably

Just installed the latest NextcloudPi Img from Release Various fixes · nextcloud/nextcloudpi · GitHub for the Raspberry Pi.
Worked like intendet, done the activating Process and tried to enable SSH →

[ SSH ] (Thu Sep 29 10:21:07 BST 2022)
New password: Retype new password: passwd: password updated successfully
Synchronizing state of ssh.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ssh
Created symlink /etc/systemd/system/sshd.service → /lib/systemd/system/ssh.service.
Created symlink /etc/systemd/system/multi-user.target.wants/ssh.service → /lib/systemd/system/ssh.service.
SSH enabled
(From the Nextcloud Pi Config Web intreface)

Connecting with SSH Client worked and was forced to change Password, after changing Password, was forced to logout and log back in:

NextCloudPi v1.50.1 is up to date
Last login: Thu Sep 29 09:38:08 2022 from 192.168.20.6
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for pi.
Current password:
New password:
Retype new password:
The password has not been changed.
New password:
Retype new password:
passwd: password updated successfully

When loggin back in:
NextCloudPi v1.50.1 is up to date
Last login: Thu Sep 29 09:38:44 2022 from 192.168.20.6
This account is currently not available.

What can i do to enable/use SSH on my NextcloudPi?

I think I have exactly the same problem…

  • I activate SSH and set a new password for the user “pi” in the NextcloudPi Panel
  • I then log in via SSH
  • There I get the message: “You are required to change your password immediately (administrator enforced).”
  • I change my password
  • when logging in with the new password I get the message: “This account is currently not available.”

The Image I downloaded is yesterday´s release (https://github.com/nextcloud/nextcloudpi/releases/download/v1.50.1/NextCloudPi_RaspberryPi_v1.50.1.zip)

[Edit]
I found a micro-HDMI-cable and tried to log in directly, even that did not work. The output I get after logging in is - just like when connecting via SSH:

This account is currently not available.

However the login attempts (both direct and SSH) seem to count as logins, the “last login” counts them.

1 Like

Problem solved! The pi-Account in /etc/passwd had “/bin/nologin”. To make it work

  • Mount the SD-Card from your pi on a Linux-System
  • edit the file /etc/passwd
  • for the user “pi” replace “/bin/nologin” with “/bin/bash”
1 Like

Hey @haukew,

Glad you got it to work. The (imo) better solution is, to use the ncp user :slight_smile:
But I agree that this should be fixed

2 Likes

What do you exactly mean be “to use the ncp user”, @theCalcaholic? How does this help me to access SSH? I actually tried to connect via ssh ncp@my.local.ip.adress but it gives me the same error message… and unfortunately I dont have another LINUX system via which I could edit the file mentioned by @haukew:frowning:

Hmmm…Maybe try a Linux in a VM via VirtualBox? @Pico

@Nils_Seegerer @haukew @Pico A fix is now in master. If you run a update via the web UI and then reapply the SSH settings, you should be able to access your instance via ssh.

There’ll soon be a new release with the fix as well.

3 Likes

Great - thanks a lot!