How to set up NISDOMAIN

Hi,
I’m teaching System Administration, and in my NIS exercise I need to setup the NISDOMAINNAME at each boot.

Usually in CentOS this is done in /etc/sysconfig/network with the line
NISDOMAIN=xxxx

But in AlmaLinux it does not work. Any idea which file and variable to use to set up? I don’t want to use the line command “nisdomainname” after each boot!

The rest looks great, I love AlmaLinux, simple and very standard for teaching.

Thanks,
Daniel

Problem solved!

It seems that in AlmaLinux you need to enable (with systemctl) the client ypbind to enable the system to read the NISDOMAIN variable in the file /etc/sysconfig/network at boot time.

In other Linux version, by enabling the server ypserv it did work. In AlmaLinux it’s the client that you need to enable. So you can’t create a server without having a client on the same machine.

Thanks for those who were looking for a solution, and here is the solution for those who were stuck with this problem.

Thanks,
Daniel