Graylog

Fixer l’ip en 192.168.2.4

sudo vim /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: yes
    ens160:
      dhcp4: no
      addresses: [192.168.2.4/24]
      gateway4: 192.168.2.1
sudo netplan apply

Changer le mot de passe

┌──(ubuntu㉿graylog)-[~]
└─$ pwgen -N 1 -s 96
ZvvOwBbWJOdTWUJdeqLsamxTaMl0l1dlL4y1OWgsSeWg3TCmN7QENURDmvs0UD0RNbQIvMlLxubgiy5tZ8m8qbDI9nN8pqfD

┌──(ubuntu㉿graylog)-[~]
└─$ sudo vim server.conf
# You MUST set a secret to secure/pepper the stored user passwords here. Use at least 64 characters.
# Generate one by using for example: pwgen -N 1 -s 96
# ATTENTION: This value must be the same on all Graylog nodes in the cluster.
# Changing this value after installation will render all user sessions and encrypted values in the database invalid. (e.g. encrypted access tokens)
password_secret = ZvvOwBbWJOdTWUJdeqLsamxTaMl0l1dlL4y1OWgsSeWg3TCmN7QENURDmvs0UD0RNbQIvMlLxubgiy5tZ8m8qbDI9nN8pqfD

Grâce à la fonction de hachage sha256sum nous allons générer un hash de notre mot de passe.

A contrario de ce qui est dit dans le document, il ne faut surtout pas utiliser echo -n yourpassword | shasum -a 256 pour la simple raison que ça veut dire que le mot de passe est en claire dans l’historique. Il faut au minimum passer par stdin pour que ça soit généré de façon plus discrète.

# You MUST specify a hash password for the root user (which you only need to initially set up the
# system and in case you lose connectivity to your authentication backend)
# This password cannot be changed using the API or via the web interface. If you need to change it,
# modify it in this file.
# Create one by using for example: echo -n yourpassword | shasum -a 256
# and put the resulting hash value into the following line
root_password_sha2 = e70b0b5ad76dca6467de83842bec215dac895213dd0184d5e002a493fa7eebe1