Hardware: VPS bought online YunoHost version: 188.8.131.52 (stable) I have access to my server : Through SSH, through the webadmin, and through hosting emergency console. Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Description of my issue
I’m moving Yunohost instance to another VPS hosting. Previously I’ve done it via creating backup archives and restoring them in the new place.
NB: full logs of Restore system from a backup archive: https://paste.yunohost.org/raw/inodiqojif. There are also few records for adjacent ops, including deletion of permissions for individual apps. Please, tell what of them could be useful.
The steps I took. Backup system part of existing Yunohost instance, created a fresh VPS Debian 11 instance, sftpgetarchives dir, ran install script, ran yunohost backup restore with backup name copied from list command, changed the port for SSH regarding hosting requirements, yunohost tools reboot, log in with admin, got admin is not in the sudoers file. This incident will be reported. And can’t get around it.
The problem.sudo, sudo su, su: all of them returns the aforementioned “not in sudoers” when ran from adminsshed.
PS Just noticed the difference between support category and discussions – sorry for x-posting.
Note that you need to be root for this, and you should be able to become root from any other account using su, entering root’s password (which should be admin’s user, though i’m not 100% sure because maybe restoring on a fresh system doesnt re-set root password to be admin’s password…)
Just saw the other post in which you explain that you cannot su … There may be a sort of “workaround” then, if you are able to connect to the webadmin : go in the Tools section and change the admin password, which should also change root’s password
Does this hosting use some non-standard Debian image? =((
# systemctl | grep "slapd\|sudo"
slapd.service loaded active running LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)
sudo-ldap.service loaded active exited LSB: Provide limited super user privileges to specific users
# dpkg --list | grep "slapd\|ldap"
ii dovecot-ldap 1:2.3.13+dfsg1-2+deb11u1 amd64 secure POP3/IMAP server - LDAP support
ii ldap-utils 2.4.57+dfsg-3+deb11u1 amd64 OpenLDAP utilities
ii libdbd-ldap-perl 0.20-1.1 all Perl extension for LDAP access via an SQL/Perl DBI interface
ii libldap-2.4-2:amd64 2.4.57+dfsg-3+deb11u1 amd64 OpenLDAP libraries
ii libnet-ldap-perl 1:0.6800+dfsg-1 all client interface to LDAP servers
ii libnss-ldapd:amd64 0.9.11-1 amd64 NSS module for using LDAP as a naming service
ii libpam-ldapd:amd64 0.9.11-1 amd64 PAM module for using LDAP as an authentication service
ii lua-ldap:amd64 1.2.5-1+b1 amd64 LDAP library for the Lua language
ii php7.4-ldap 1:7.4.30-3+0~20220627.69+debian11~1.gbpf2b381 amd64 LDAP module for PHP
ii postfix-ldap 3.5.13-0+deb11u1 amd64 LDAP map support for Postfix
ii python3-ldap:amd64 3.2.0-4+b3 amd64 LDAP interface module for Python3
ii slapd 2.4.57+dfsg-3+deb11u1 amd64 OpenLDAP server (slapd)
ii sudo-ldap 1.9.5p2-3 amd64 Provide limited super user privileges to specific users
I have the same problem (same diagnosis), following buster migration. In my case, dpkg failed on a package (empty/faulty string on libaspell15) so I had to do some manual upgrade.
In that process, apt --fix-broken install and apt asked for replacement of some config file (“keep old or use new…”) and I may have given the wrong answer for ldap.