Cli wizard : exemple de unattended en cli sur ldap

Etant entrain de bosser sur ldap je me suis vu confronté a la re configuration du paquet en changement le rootdn et la j’ai eu la flemme de chercher quels fichiers et quelles actions entraient en jeu.

J’ai donc creusé sur le wizard cli qui sort avec un dpkg-reconfigure et je suis tombé sur deb-conf bien sur uniquement pour Debian et ses forks.
Quel merveille !!! En route pour une reconfiguration automatique de slapd.

debconf-show slapd
root@hdr12:~# debconf-show slapd
  slapd/internal/generated_adminpw: (password omitted)
* slapd/password2: (password omitted)
  slapd/internal/adminpw: (password omitted)
* slapd/password1: (password omitted)
* slapd/allow_ldap_v2: false
  slapd/password_mismatch:
  slapd/invalid_config: true
* shared/organization: test.cyklodev.com
  slapd/upgrade_slapcat_failure:
* slapd/no_configuration: false
* slapd/move_old_database: true
  slapd/dump_database_destdir: /var/backups/slapd-VERSION
* slapd/purge_database: false
* slapd/domain: customer.auth
* slapd/backend: HDB
  slapd/dump_database: when needed

On y retrouve les pages du wizard obligatoires avec une * et on peut accéder a chacun des champs avec un

echo "get  slapd/backend" | debconf-communicate
0 HDB

On peut bien sur les modifier

echo "set  slapd/backend HDB" | debconf-communicate
0 value set

Il ne reste plus qu’a lancer la reconfiguration du paquet en specifiant le mode non interactif.

dpkg-reconfigure -f noninteractive slapd

Comme quoi la flemme c’est bien !

Zephilou

3 Responses

  1. Someone essentially lend a hand to make seriously posts I’d state. This is the very first time I frequented your website page and so far? I amazed with the analysis you made to make this particular submit incredible. Great task!

  2. Have you ever thought about creating an e-book or guest authoring
    on other blogs? I have a blog centered on the same topics you discuss and would really like to have you share some stories/information.
    I know my visitors would appreciate your work. If you’re even remotely interested, feel free to send me an e-mail.

  3. I do like the way you have presented this particular difficulty plus it
    really does provide me some fodder for thought.
    On the other hand, coming from what precisely I have observed, I just trust when other remarks
    stack on that men and women keep on issue and not get started upon a tirade associated with the news du jour.
    Yet, thank you for this exceptional point and even though I can not
    go along with this in totality, I value your viewpoint.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Post comment