[Résolu] Perte d'accès suite à mise à jour

command not found
Je pense que je devrais activer root pour pouvoir m’y loguer avec le système complet, pas en rescue

Meh tu bien en root là ?

oui mais en rescue

Et /usr/sbin/slapd ?

# /usr/sbin/slapd
-bash: /usr/sbin/slapd: No such file or directory

Et ls /usr

Attends je tente un redémarrage normal
=> raté, je repars en rescue

Qu’est ce qui à raté ?

Le redémarrage en mode normal pour activer root

Sinon tu peut essayer de mettre ta clef publique directement dans root pour t’authentifier directement en root en mode normal.

dans /root/.ssh/authorized_keys ?
=> ça ne fonctionne pas

Quel est le problème ?

As tu vérifier les droit à ce fichier ? Tu doit normalement avoir ceci -rw------- 1 root root

A mon avis il faut d’abord trouver comment ouvrir un shell sur la machine en root, sans etre en mode rescue (qui a mon avis est trop “hardcore” dans le sens où le rescue c’est plutot pour quand la machine ne boot plus)

Normalement (enfin, ça dépends des fournisseurs de VPS) tu devrais pouvoir avoir un mode où c’est “comme si” tu avais un écran directement branché sur la machine. Dans ce cas, tu peux demander à te logger en root puis taper le mot de passe correspondant et être en root dessus…

Il est toujours en mode rescue, donc à mon avis le système de fichier “normal” n’est même pas monté

Ça y est je suis sur le vrai système

# systemctl start slapd
Job for slapd.service failed because the control process exited with error code.
See "systemctl status slapd.service" and "journalctl -xe" for details.
# systemctl status slapd.service
● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)
   Loaded: loaded (/etc/init.d/slapd; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-07-05 18:09:17 CEST; 35s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2099 ExecStart=/etc/init.d/slapd start (code=exited, status=1/FAILURE)

Jul 05 18:09:17 mydomain systemd[1]: Starting LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)...
Jul 05 18:09:17 mydomain slapd[2109]: @(#) $OpenLDAP: slapd  (May 23 2018 04:25:19) $
                                              Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Jul 05 18:09:17 mydomain slapd[2099]: Starting OpenLDAP: slapd failed!
Jul 05 18:09:17 mydomain systemd[1]: slapd.service: Control process exited, code=exited status=1
Jul 05 18:09:17 mydomain systemd[1]: Failed to start LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol).
Jul 05 18:09:17 mydomain systemd[1]: slapd.service: Unit entered failed state.
Jul 05 18:09:17 mydomain systemd[1]: slapd.service: Failed with result 'exit-code'.
# journalctl -xe
Jul 05 18:09:19 mydomain postfix/cleanup[1145]: 08967BFB5C: message-id=<20190705160919.08967BFB5C@mydomain>
Jul 05 18:09:19 mydomain postfix/cleanup[1145]: warning: dict_ldap_connect: Unable to bind to server ldap://localhost:389 with dn empty or implicit: -1 (Can't contact LDAP server)
Jul 05 18:09:19 mydomain postfix/cleanup[1145]: warning: ldap:/etc/postfix/ldap-aliases.cf lookup error for "root@mydomain"
Jul 05 18:09:19 mydomain postfix/cleanup[1145]: warning: 08967BFB5C: virtual_alias_maps map lookup problem for root@mydomain -- message not accepted, try again later
Jul 05 18:09:19 mydomain postfix/pickup[1137]: 09A41BFB5C: uid=1007 from=<admin>
Jul 05 18:09:19 mydomain postfix/cleanup[1145]: 09A41BFB5C: message-id=<20190705160919.09A41BFB5C@mydomain>
Jul 05 18:09:19 mydomain postfix/cleanup[1145]: warning: dict_ldap_connect: Unable to bind to server ldap://localhost:389 with dn empty or implicit: -1 (Can't contact LDAP server)
Jul 05 18:09:19 mydomain postfix/cleanup[1145]: warning: ldap:/etc/postfix/ldap-aliases.cf lookup error for "root@mydomain"
Jul 05 18:09:19 mydomain postfix/cleanup[1145]: warning: 09A41BFB5C: virtual_alias_maps map lookup problem for root@mydomain -- message not accepted, try again later
Jul 05 18:10:01 mydomain nslcd[910]: [7ed7ab] <passwd="admin"> failed to bind to LDAP server ldap://localhost/: Can't contact LDAP server: Transport endpoint is not connected
Jul 05 18:10:01 mydomain nslcd[910]: [7ed7ab] <passwd="admin"> no available LDAP server found: Can't contact LDAP server: Transport endpoint is not connected
Jul 05 18:10:17 mydomain dovecot[1200]: auth: Error: LDAP: Can't connect to server: 127.0.0.1
Jul 05 18:10:17 mydomain dovecot[1200]: auth: Error: LDAP: Can't connect to server: 127.0.0.1
Jul 05 18:10:19 mydomain postfix/pickup[1137]: 197B6BFB5C: uid=1007 from=<admin>
Jul 05 18:10:19 mydomain postfix/cleanup[1145]: 197B6BFB5C: message-id=<20190705161019.197B6BFB5C@mydomain>
Jul 05 18:10:19 mydomain postfix/cleanup[1145]: warning: dict_ldap_connect: Unable to bind to server ldap://localhost:389 with dn empty or implicit: -1 (Can't contact LDAP server)
Jul 05 18:10:19 mydomain postfix/cleanup[1145]: warning: ldap:/etc/postfix/ldap-aliases.cf lookup error for "root@mydomain"
Jul 05 18:10:19 mydomain postfix/cleanup[1145]: warning: 197B6BFB5C: virtual_alias_maps map lookup problem for root@mydomain -- message not accepted, try again later
Jul 05 18:10:19 mydomain postfix/pickup[1137]: 1B0AFBFB5C: uid=1007 from=<admin>
Jul 05 18:10:19 mydomain postfix/cleanup[2129]: 1B0AFBFB5C: message-id=<20190705161019.1B0AFBFB5C@mydomain>
Jul 05 18:10:19 mydomain postfix/cleanup[2129]: warning: dict_ldap_connect: Unable to bind to server ldap://localhost:389 with dn empty or implicit: -1 (Can't contact LDAP server)
Jul 05 18:10:19 mydomain postfix/cleanup[2129]: warning: ldap:/etc/postfix/ldap-aliases.cf lookup error for "root@mydomain"
Jul 05 18:10:19 mydomain postfix/cleanup[2129]: warning: 1B0AFBFB5C: virtual_alias_maps map lookup problem for root@mydomain -- message not accepted, try again later
Jul 05 18:10:19 mydomain postfix/pickup[1137]: 1CFCCBFB5C: uid=1007 from=<admin>
Jul 05 18:10:19 mydomain postfix/cleanup[1145]: 1CFCCBFB5C: message-id=<20190705161019.1CFCCBFB5C@mydomain>
Jul 05 18:10:19 mydomain postfix/cleanup[1145]: warning: dict_ldap_connect: Unable to bind to server ldap://localhost:389 with dn empty or implicit: -1 (Can't contact LDAP server)
Jul 05 18:10:19 mydomain postfix/cleanup[1145]: warning: ldap:/etc/postfix/ldap-aliases.cf lookup error for "root@mydomain"
Jul 05 18:10:19 mydomain postfix/cleanup[1145]: warning: 1CFCCBFB5C: virtual_alias_maps map lookup problem for root@mydomain -- message not accepted, try again later
Jul 05 18:10:19 mydomain postfix/pickup[1137]: 1DD08BFB5C: uid=1007 from=<admin>
Jul 05 18:10:19 mydomain postfix/cleanup[2129]: 1DD08BFB5C: message-id=<20190705161019.1DD08BFB5C@mydomain>
Jul 05 18:10:19 mydomain postfix/cleanup[2129]: warning: dict_ldap_connect: Unable to bind to server ldap://localhost:389 with dn empty or implicit: -1 (Can't contact LDAP server)
Jul 05 18:10:19 mydomain postfix/cleanup[2129]: warning: ldap:/etc/postfix/ldap-aliases.cf lookup error for "root@mydomain"
Jul 05 18:10:19 mydomain postfix/cleanup[2129]: warning: 1DD08BFB5C: virtual_alias_maps map lookup problem for root@mydomain -- message not accepted, try again later
Jul 05 18:10:19 mydomain postfix/pickup[1137]: 1EBF7BFB5C: uid=1007 from=<admin>
Jul 05 18:10:19 mydomain postfix/cleanup[1145]: 1EBF7BFB5C: message-id=<20190705161019.1EBF7BFB5C@mydomain>
Jul 05 18:10:19 mydomain postfix/cleanup[1145]: warning: dict_ldap_connect: Unable to bind to server ldap://localhost:389 with dn empty or implicit: -1 (Can't contact LDAP server)
Jul 05 18:10:19 mydomain postfix/cleanup[1145]: warning: ldap:/etc/postfix/ldap-aliases.cf lookup error for "root@mydomain"
Jul 05 18:10:19 mydomain postfix/cleanup[1145]: warning: 1EBF7BFB5C: virtual_alias_maps map lookup problem for root@mydomain -- message not accepted, try again later
Jul 05 18:10:23 mydomain dovecot[1200]: auth: Error: LDAP: Can't connect to server: 127.0.0.1

(j’ai remplacé mon domaine réel par “mydomain”)

Et le résultat de “tail -n 1000 /var/log/debug | grep slapd” est ici :
https://framabin.org/p/?e8088729a50ac3e5#tlxYpDJUuTtkPyykb1eAAGcRRjCJ6uBEF+I9s6dR99s=

Ok que dis systemctl status slapd maintenant ?

Juste au-dessus ! :point_up_2:

Et là si tu essaye su -c slapd openldap ?

Pas de retour pour cette commande (ni en bien ni en mal), mais :

# tail /var/log/debug | grep slapd
slapd[3405]: @(#) $OpenLDAP: slapd  (May 23 2018 04:25:19) $#012#011Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
daemon: bind(9) failed errno=99 (Cannot assign requested address)
slapd stopped.
connections_destroy: nothing to destroy.