Lost access to VPS-server

I have searched the forum for similar issues

on

This category is for general issues(=something is broken) regarding YunoHost, NOT apps.

on

This form is written in English but feel free to write in French if you’re more comfortable!

on

What type of hardware are you using

VPS bought online

What YunoHost version are you running

12.1.41.2

How are you able to access your server

SSH

Are you in a special context or did you perform specific tweaking on your YunoHost instance ?

Just changed /etc/hosts

Describe your issue

No login on a vps (debian bookworm) was possible at all, incl. ssh. I got access to root through the vps provider’s vnc and opened for root access by changing /etc/ssh/sshd_config allowing PermitRootLogin and Passwordauthenthication. The reason why I could not access, was that yunohost had lost access to the users in slapd because I had changed /etc/hosts in an inappropriate way. It can be prevented by changing “localhost” to “127.0.0.1” in /etc/default/slapd.

Share relevant logs or error messages

systemctl status slapd
● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)
Loaded: loaded (/etc/init.d/slapd; generated)
Drop-In: /usr/lib/systemd/system/slapd.service.d
└─slapd-remain-after-exit.conf
/etc/systemd/system/slapd.service.d
└─ynh-override.conf
Active: activating (auto-restart) since Thu 2026-10-22 13:15:05 CEST; 528ms ago
Docs: man:systemd-sysv-generator(8)
Process: 494948 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS)
Process: 494956 ExecStop=/etc/init.d/slapd stop (code=exited, status=0/SUCCESS)
CPU: 74ms

Wow, and seems a simple thing to prevent, maybe you can file an issue or staight pull request.

Thanks for your contribution.

Could you detailed the change you made in /etc/hosts ?

I was thinking implement your suggestion, but i have watched the history of change and discover this line changed a lot…

11 years ago

SLAPD_SERVICES="ldap://127.0.0.1/ ldapi://127.0.0.1/"

11 years ago : [fix] Slapd default spacing

SLAPD_SERVICES="ldap:/// ldapi:///"

7 years ago: only open socket to localhost

SLAPD_SERVICES="ldap://127.0.0.1:389/ ldap://\[::1\]:389/ ldapi:///"

7 years ago: Remove binding to IPv6 ::1 as it makes ipv4-only instances crash… (unable to bind to ::1)

SLAPD_SERVICES="ldap://127.0.0.1:389/ ldaps:/// ldapi:///"

2 years ago: [Fix] Make slapd listen also on ipv6

SLAPD_SERVICES="ldap://localhost:389/ ldaps:/// ldapi:///"

So i am a bit afraid to make another change and maybe create others problem in others situations. From my point of view we should support:

  • IPv4 only setup (with ipv6 disabled)
  • Bad localhost or missing localhost
  • Maybe IPv6 only setup (with IPv4 disabled) (it’s not officially supported, but we have a ticket on this)
  • Maybe some setup could evolve so the ideal is to have a configuration which doesn’t need to be changed if the situation evolved…

I hope this answer was helpful. Please keep in mind that most of YunoHost’s development is done by volunteers, including this answer. Some of them earn less than the minimum wage in their country. If you can afford it, please consider donating to the 2026 fundraising campaign to help us keep this project going without putting anyone at risk.