Enrôler une machine sur FreeIPA |
Article original Publié le : 13 janvier 2018
Mise a jour le : – |
Le principe de l’enrôlement sur FreeIPA est similaire a un AD, il inscrit la machine dans le dns et permet de pouvoir s’authentifier avec son compte déclaré dans le domaine.
Le pré-requis étant au moins de renseigner le domaine sur la machine cliente, son fichier hosts et d’avoir le serveur FreeIPA en dns
1 |
$ hostname -f |
1 |
machine.domaine.local |
1 |
$ hostname -i |
1 |
192.168.1.100 |
1 |
$ cat /etc/resolv.conf |
1 2 |
search domaine.local nameserver 192.168.1.1 |
Pour l’installation du client c’est assez simple
1 |
$ sudo yum install freeipa-client |
Enfin, pour inscrire la machine il faut lancer la commande ci-dessous.
Le paramètre –mkhomedir permet à FreeIPA de créer les répertoires de base pour les utilisateurs lorsqu’ils se connectent à la machine pour la première fois.
1 |
# ipa-client-install -N --mkhomedir |
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 34 35 36 37 38 39 40 41 |
Discovery was successful! Client hostname: <strong>machine.domaine.local</strong> Realm: <strong>DOMAINE.LOCAL</strong> DNS Domain: <strong>domaine.local</strong> IPA Server: <strong>serveur-freeipa.domaine.local</strong> BaseDN: dc=<strong>domaine</strong>,dc=<strong>local</strong> Continue to configure the system with these values? [no]: <strong>yes</strong> Skipping synchronizing time with NTP server. User authorized to enroll computers: <strong>admin</strong> Password for <strong>admin@DOMAINE.LOCAL</strong>: Successfully retrieved CA cert Subject: CN=Domaine Local Root,OU=0002 433456782,O=Domaine,C=LOCAL Issuer: CN=Domaine Local Root,OU=0002 433456782,O=Domaine,C=LOCAL Valid From: 2018-12-18 12:49:37 Valid Until: 2038-12-18 12:49:37 Enrolled in IPA realm <strong>DOMAINE.LOCAL</strong> 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 <strong>DOMAINE.GROUP</strong> trying https://serveur-freeipa.domaine.local/ipa/json [try 1]: Forwarding 'schema' to json server 'https://serveur-freeipa.domaine.local/ipa/json' trying https://serveur-freeipa.domaine.local/ipa/session/json [try 1]: Forwarding 'ping' to json server 'https://serveur-freeipa.domaine.local/ipa/session/json' [try 1]: Forwarding 'ca_is_enabled' to json server 'https://serveur-freeipa.domaine.local/ipa/session/json' Systemwide CA database updated. Hostname (machine.domaine.local) does not have A/AAAA record. Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub [try 1]: Forwarding 'host_mod' to json server 'https://serveur-freeipa.domaine.local/ipa/session/json' SSSD enabled Configured /etc/openldap/ldap.conf Configured /etc/ssh/ssh_config Configured /etc/ssh/sshd_config Configuring domaine.local as NIS domain. Client configuration complete. The ipa-client-install command was successful |
Pour finir
Faire un “dig a machine.domaine.local” pour vérifier son enregistrement.
Faire un “dig -x 192.168.1.100” pour vérifier son PTR
Tester la connexion avec son utilisateur a la vm