You are not logged in.

#1 2013-09-23 02:12:08

joesalerno
Member
Registered: 2013-09-23
Posts: 2

How do I make nisdomainname persistent across reboots?

I am trying to set up an NIS server on my network that provides user accounts to clients to log in with. As far as I know, I have followed the steps for setting up the client/server exactly as written in the Arch Wiki. The server appears to be working, and I have successfully logged in as a user in the passwd.byname file.

But I am having problems with my client. The problem I am having right now is that the NIS domain name becomes unset every time I reboot the computer. NIS will not work after a reboot until I manually reset the NIS domain name.

After I reboot the client, running the command "domainname" gives the following output:

(none)

And the command "ypdomainname" returns:

Local domain name not set

After I run either "sudo domainname example.com" or "sudo ypdomainname example.com", the above commands then correctly output:

example.com

In order to fix this I have tried creating the /etc/conf.d/nisdomainname file:

echo 'NISDOMAINNAME="example.com"' > /etc/conf.d/nisdomainname

This did not work. I have also tried configuring the DHCP server on my network to provide the NIS domain. This didn't work also.

Here is the dhcpd.conf file on the server:

[joseph@archserver yp]$ cat /etc/dhcpd.conf
default-lease-time 604800;
option domain-name "example.com";
option domain-name-servers 192.168.1.50;
option nis-domain "example.com";
option nis-servers 192.168.1.50;
option subnet-mask 255.255.255.0;
option routers 192.168.1.1;
subnet 192.168.1.0 netmask 255.255.255.0 {
   range 192.168.1.30 192.168.1.150;
}

And on the client I have modified the dhcpcd.conf file:

[joe@archclient1 ~]$ cat /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
#clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
duid

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name

option nis_servers, nis_domain

option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
# Some interface drivers reset when changing the MTU so disabled by default.
#option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname
noipv4ll

I have also tried adding this line to the dhcpcd.conf file on the client:

static nis_domain="example.com"

Nothing I have tried so far has been able to make the client aware of the NIS domain name after a reboot. I'd very much appreciate any help I can get with this. Thank you.

Last edited by joesalerno (2013-09-23 22:50:53)

Offline

#2 2013-09-23 22:54:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How do I make nisdomainname persistent across reboots?

Moving to Networking...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB