Authentication Failure for NS8 Admin Interface After Migration from NS7

Description of the Problem:

We are experiencing an authentication issue with the NS8 admin interface after migrating from NS7.

Environment Details:

  • Hypervisor: ProxMox

  • NS8 Installation: Deployed from the system snapshot available at https://tinyurl.com/ns8-rocky-qcow2

  • Configuration: Static IP address assigned. An additional user with admin cluster privileges (support) was created.

Steps Taken:

  1. Successfully set up NS8 with static IP.

  2. Verified that login to the UI at https://<host IP>/cluster-admin was functional initially.

  3. Migrated data from NS7 SambaDC (including Folders and Mail) to NS8.

  4. Installed the Roundcube client after migration.

  5. The cluster operated without significant issues until the end of the day.

Issue:
On the following day, attempts to log in to https://<host IP>/cluster-admin using both the admin and support accounts fail. Authentication is no longer working, preventing access to the admin interface.

Change cluster admin password not working

[root@sv-0-236 ~]# api-cli run   alter-user --data '{"user":"admin","set":{"password":"Nethesis,1234","2fa":false}}'
AuthenticationError: invalid username-password pair or user is disabled.

I also see an error when starting the service…

Failed to start ns8-install-finalize.service.

redis.exceptions.AuthenticationError: invalid username-password pair or user is disabled.

Please advise what other information we can provide to resolve the issue?

Hi and welcome to the NethServer community!

Are the cluster-admin users still there?

api-cli run list-users

Let’s get the user info of the admin user:

api-cli run get-user-info --data '{"user":"admin"}'

Maybe there’s some other issue like disk full?

df -h / /home
[root@sv-0-236 ~]# api-cli run list-users
AuthenticationError: invalid username-password pair or user is disabled.

[root@sv-0-236 ~]# api-cli run get-user-info --data '{"user":"admin"}'
AuthenticationError: invalid username-password pair or user is disabled.

[root@sv-0-236 ~]# df -h / /home
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda4       639G  535G  105G  84% /
/dev/sda4       639G  535G  105G  84% /

I get this results

Maybe first I need?
api-cli login

[root@sv-0-236 ~]# api-cli run list-users -u admin -p ***
_alogin request attempt failed (503, message='Service Unavailable', url='http://cluster-leader:9311/api/login'). Retrying...
^CSIGINT caught! Sending cancel-task requests...
^CSIGINT caught! Sending cancel-task requests...
Terminated
[root@sv-0-236 ~]# ping cluster-leader
PING cluster-leader (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.077 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.022 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.039 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.098 ms
^C
--- cluster-leader ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3095ms
rtt min/avg/max/mdev = 0.022/0.059/0.098/0.030 ms

This service should be removed automatically at the first image boot. I suppose something went wrong in that phase.

I suggest to not use the prebuilt image. Instead install with the standard procedure over a clean Rocky Linux or Debian system. Installation — NS8 documentation

1 Like

I’ve already migrated my email client data and public folders to the host. Will reinstalling delete this data? How can I safely perform the installation?

I used the following command to install

curl ``https://raw.githubusercontent.com/NethServer/ns8-core/ns8-stable/core/install.sh`` | bash

As something went wrong I think it’s the safest way to do a full reinstall including the OS which would delete the data.

To reset the NS7 to the state before migration, see GitHub - NethServer/nethserver-ns8-migration

That could be the issue.
The pre-built image already has NS8 preinstalled so there’s no need to run the standard installation procedure.

Is it possible to reinstall without losing data?

I don’t think so. Uninstalling NS8 would remove all apps including data.

As something went wrong it’s the safest way to do a fresh clean install of OS and NS8 and migrate Samba and Mail again from the NS7.

Thank you. I will check.

1 Like

I have a problem
How to re-migrate.

If the NS7 used an external account provider, it must be created on the NS8 first, see NethServer 7 migration — NS8 documentation

Or maybe you need to go back before migration on the NS7:

If the migration fails, both clusters become inoperable?

Sorry, I don’t understand. Which both clusters?

Usually you migrate from an NS7 server to an NS8 cluster that can have just one or more nodes.

Even if the migration of one app fails, the cluster should still be operable.

Thank you. I will check this out.

1 Like