[Solved] Admin user do not have admin rights after restore

My YunoHost server

Hardware: Computer at home
YunoHost version: 11.2.30

I have access to my server : Through SSH
Are you in a special context, or did you perform some particular tweaking on your YunoHost instance ? : no

What I Did:

  1. Installed Debian and created an admin user abc during the setup.
  2. Installed YunoHost using the curl method.
  3. Restored my YunoHost server from a backup.

What I Expected:

  • The user abc should retain or regain its admin rights, including SSH access, and be part of the admins group.

What I See:

  • The user abc is listed in the admins group in admin web interface.
  • However, abc does not have admin rights or proper group memberships that allow for SSH access and other admin privileges.
  • $ sudo getent group admins shows xxx in the admins group.
    admins:*:4001:,abc,cdf,xyz,admin
  • $ groups abc shows that xxx is not a part of the admins group.
    abc : abc cdrom floppy audio dip video plugdev netdev ssh
  • All other users have correct rights and have all the privileges as before.

Questions:

  1. Can it be mismatching of the UID with account created while installing the Debian and what Yunohost would have in its backup? While in restore, it might have ignored creation of the user with YunoHost assigned UID because the user already existed on Debian. If that is the case, how this mess can be fixed?
  2. How this can be avoided in the next restore. As the Debian wants the admin user to be given at the time of the installation. Should this user be different from the all the users in the YunoHost?

Sounds like xxx is both a UNIX user and a YunoHost/LDAP user…

Does grep xxx /etc/passwd list something …?

Edit:

Can it be mismatching of the UID with account created while installing the Debian and what Yunohost would have in its backup?

Yes …

Yes, let’s keep it abc, so that it don’t confuse with x.

abc:x:1000:1000:abc,,,:/home/abc:/bin/bash

As discussed on chat discussion with @Aleks

There is conflict between Unix and Yunohost user.
Deleting the Unix user and rebooting solved it.

sudo userdel -r abc

yunohost tools reboot

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.