tech:notes_ghost_changer_nom_ip
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédente | |||
| tech:notes_ghost_changer_nom_ip [2026/04/27 18:21] – Jean-Baptiste | tech:notes_ghost_changer_nom_ip [2026/05/29 18:17] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Changer le nom ou l'IP d'un serveur GNU/Linux | ||
| + | |||
| + | ### Template VM | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | RedHat registration | ||
| + | ~~~bash | ||
| + | subscription-manager unregister | ||
| + | subscription-manager remove --all | ||
| + | subscription-manager clean | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | Hostname | ||
| + | ~~~bash | ||
| + | hostnamectl set-hostname localhost.localdomain | ||
| + | ~~~ | ||
| + | |||
| + | Udev | ||
| + | ~~~bash | ||
| + | rm -rf / | ||
| + | ~~~ | ||
| + | |||
| + | machine-id | ||
| + | ~~~bash | ||
| + | # / | ||
| + | #chmod 777 / | ||
| + | > / | ||
| + | #chmod 444 / | ||
| + | ~~~ | ||
| + | |||
| + | Voir aussi : | ||
| + | * / | ||
| + | * / | ||
| + | Qui peuvent être copiés sur l' | ||
| + | |||
| + | Réseau | ||
| + | ~~~bash | ||
| + | rm -f / | ||
| + | #sed -i '/ | ||
| + | #sed -i '/ | ||
| + | ~~~ | ||
| + | |||
| + | Clean /var/log/ | ||
| + | ~~~bash | ||
| + | find /var/log/ -type f -name " | ||
| + | find /var/log/ -type f -name " | ||
| + | |||
| + | rm -rf / | ||
| + | systemd-tmpfiles --create --prefix / | ||
| + | systemctl restart systemd-journald | ||
| + | |||
| + | #for fic in $(find /var/log/ -type f) ; do > $fic ; done | ||
| + | find /var/log/ -type f -exec /bin/sh -c '> | ||
| + | |||
| + | rm / | ||
| + | find /var/log/ -type f -name " | ||
| + | find /var/log/ -type f -name " | ||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | # Debian | ||
| + | killall dhclient | ||
| + | #rm / | ||
| + | rm -f / | ||
| + | killall ntpd | ||
| + | rm / | ||
| + | ~~~ | ||
| + | |||
| + | Autres RedHat | ||
| + | ~~~bash | ||
| + | # | ||
| + | # sys-unconfig | ||
| + | # touch / | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Bash history | ||
| + | ~~~bash | ||
| + | rm -f / | ||
| + | rm -f / | ||
| + | history -c && history -w | ||
| + | ~~~ | ||
| + | |||
| + | Poweroff | ||
| + | ~~~bash | ||
| + | poweroff | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ### Renommer un serveur | ||
| + | |||
| + | ~~~bash | ||
| + | grep $(hostname -s) -Ril /etc/ | ||
| + | ~~~ | ||
| + | |||
| + | Fichier à modifier | ||
| + | * / | ||
| + | * /etc/hosts | ||
| + | * / | ||
| + | * / | ||
| + | * / | ||
| + | * / | ||
| + | * / | ||
| + | |||
| + | ~~~bash | ||
| + | rm -f / | ||
| + | systemd-machine-id-setup | ||
| + | ~~~ | ||
| + | |||
| + | SSH | ||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | dpkg-reconfigure openssh-server | ||
| + | ~~~ | ||
| + | |||
| + | Ou | ||
| + | |||
| + | ~~~bash | ||
| + | # CHANGER LE HOSTNAME AVANT ! | ||
| + | |||
| + | #rm / | ||
| + | #rm / | ||
| + | #rm / | ||
| + | #ssh-keygen -h -N '' | ||
| + | #ssh-keygen -h -N '' | ||
| + | #ssh-keygen -h -N '' | ||
| + | |||
| + | rm -f / | ||
| + | / | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | hostnamectl set-hostname nouveau-nom | ||
| + | systemctl restart systemd-hostnamed | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Changement d' | ||
| + | |||
| + | Fichier à modifier | ||
| + | * / | ||
| + | * / | ||
| + | * / | ||
| + | |||
| + | |||
| + | ### Conf client DNS | ||
| + | |||
| + | `/ | ||
| + | ~~~ | ||
| + | #domain acme.local | ||
| + | search acme.local | ||
| + | options rotate timeout:1 retries:1 | ||
| + | #options edns0 | ||
| + | nameserver 192.168.10.253 | ||
| + | nameserver 192.168.11.253 | ||
| + | ~~~ | ||
| + | |||
| + | Avec SystemD voir `/ | ||
| + | |||
| + | |||
| + | ### Généralités | ||
| + | |||
| + | Parfois il faut aussi modifier les fichiers suivants | ||
| + | * /etc/motd | ||
| + | * /etc/issue | ||
| + | |||
| + | Voir < | ||
