Réinscription dns d’une machine
Après avoir modifié l’IP d’une machine et changé son vlan, je désinscrit la machine a travers le commande uninstall et je la réinscrit de façon tout aussi automatique.
Une fois l’IP changé, lancer la commande suivante. (peux etre nécessaire d’ajouter le paramètre –updatedns si la machine ne se désinscrit pas complétement)
Une fois la conf d’origine restauré, il n’est pas nécessaire de redémarrer la machine.
1 |
# ipa-client-install --uninstall |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Unenrolling client from IPA server Removing Kerberos service principals from /etc/krb5.keytab Disabling client Kerberos and LDAP configurations Redundant SSSD configuration file /etc/sssd/sssd.conf was moved to /etc/sssd/sssd.conf.deleted Restoring client configuration files Unconfiguring the NIS domain. nscd daemon is not installed, skip configuration nslcd daemon is not installed, skip configuration Systemwide CA database updated. Client uninstall complete. The original nsswitch.conf configuration has been restored. You may need to restart services or reboot the machine. Do you want to reboot the machine? [no]:<strong> no</strong> The ipa-client-install command was successful |
Pour réinscrire la machine au domaine, lancer la commande suivante.
Répondre OUI pour procéder avec des valeurs fixés et ne pas utilisé la découverte dns.
Répondre OUI pour continuer à configurer le système avec ces valeurs.
1 |
# ipa-client-install -N --mkhomedir --server=<strong>nom_du_serveur.domaine.tld</strong> --domain=<strong>domaine.tld</strong> |
1 2 3 4 5 6 7 8 |
Autodiscovery of servers for failover cannot work with this configuration. If you proceed with the installation, services will be configured to always access the discovered server for all operations and will not fail over to other servers in case of failure. Proceed with fixed values and no DNS discovery? [no]: <strong>yes</strong> Client hostname: nom_de_la_machine.domaine.tld Realm: DOMAINE.TLD DNS Domain: domaine.tld IPA Server: nom_du_serveur.domaine.tld BaseDN: dc=domaine,dc=tld |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
Continue to configure the system with these values? [no]: <strong>yes</strong> Skipping synchronizing time with NTP server. User authorized to enroll computers: admin Password for admin@DOMAINE.TLD: Successfully retrieved CA cert Subject: CN=Certificate Authority,O=DOMAINE.TLD Issuer: CN=Certificate Authority,O=DOMAINE.TLD Valid From: 2018-03-21 17:24:53 Valid Until: 2038-03-21 17:24:53 Enrolled in IPA realm DOMAINE.TLD Created /etc/ipa/default.conf New SSSD config will be created Configured sudoers in /etc/nsswitch.conf Configured /etc/sssd/sssd.conf Configured /etc/krb5.conf for IPA realm DOMAINE.TLD trying https://nom_de_la_machine.domaine.tld/ipa/json [try 1]: Forwarding 'schema' to json server 'https://nom_de_la_machine.domaine.tld/ipa/json' trying https://nom_de_la_machine.domaine.tld/ipa/session/json [try 1]: Forwarding 'ping' to json server 'https://nom_de_la_machine.domaine.tld/ipa/session/json' [try 1]: Forwarding 'ca_is_enabled' to json server 'https://nom_de_la_machine.domaine.tld/ipa/session/json' Systemwide CA database updated. Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub [try 1]: Forwarding 'host_mod' to json server 'https://nom_de_la_machine.domaine.tld/ipa/session/json' SSSD enabled Configured /etc/openldap/ldap.conf Configured /etc/ssh/ssh_config Configured /etc/ssh/sshd_config Configuring domaine.tld as NIS domain. Client configuration complete. The ipa-client-install command was successful |