+++ This bug was initially created as a clone of Bug #159214 +++ authconfig generates a bad yp.conf it is missing and you specify multiple NIS servers: # rm -f /etc/yp.conf ]# /usr/sbin/authconfig --enablenis --nisdomain foo --nisserver nis1,nis2 --kickstart --nostart # cat /etc/yp.conf domain foo server nis1,nis2 # /usr/sbin/authconfig --enablenis --nisdomain foo --nisserver nis1,nis2 --kickstart --nostart # cat /etc/yp.conf domain foo server nis1 ypserver nis2 -- Additional comment from jturner on 2005-06-09 14:25 EST -- QE ack. Easily tested and would be good to get fixed. -- Additional comment from juanino on 2005-07-08 15:26 EST -- I'm also interested in getting this fixed one day. -- Additional comment from bugzilla on 2006-05-03 17:34 EST -- An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2006-0376.html -- Additional comment from sstarr on 2006-10-17 16:12 EST -- Is that correct? Isn't the following configuration supposed to be done: # /usr/sbin/authconfig --enablenis --nisdomain foo --nisserver nis1,nis2 --kickstart --nostart 'expected result' : # cat /etc/yp.conf domain foo server nis1 domain foo server nis2 If you want to have two NIS servers on one domain for example? That is what I would expect the tool to do. This appears broken in: Fedora Core 4, RHEL 4, Fedora Core 5, Fedora Core 6 (Rawhide), and likely RHEL 5 Betas.
I am confused about this patch: --- authconfig-4.6.10/authinfo.c.multiple-nis 2005-02-10 17:26:38.000000000 +0100 +++ authconfig-4.6.10/authinfo.c 2005-08-04 12:03:22.000000000 +0200 @@ -1610,6 +1610,14 @@ l = strlen(" domain ") + strlen(" broadcast "); l += info->nisDomain ? strlen(info->nisDomain) : 0; l += info->nisServer ? strlen(info->nisServer) : 0; + /* we need space for all the NIS servers */ + if (non_empty(info->nisServer)) { + p = info->nisServer; + while ((p=strchr(p, ',')) != NULL) { + l += strlen("ypserver ") + 1; + p++; + } + } obuf = g_malloc0(st.st_size + 1 + l); p = ibuf; Why would additional servers use 'ypserver' when that indicates local machine?
That's how it were always configured, this patch doesn't change this. It just fixes completely broken output when the yp.conf was empty. ypserver is used for the default domain and as we don't support multiple domains in authconfig UI it should not matter.
The manpage mentions you do support multiple servers for one NIS domain. Is this a bug then in the manpage?
No, it should work, because the one NIS domain is set as local (default) domain and thus the servers in the ypserver should be contacted for this domain.