Bug 211226

Summary: authconfig makes broken yp.conf with multiple nis servers
Product: [Fedora] Fedora Reporter: Shawn Starr <sstarr>
Component: authconfigAssignee: Tomas Mraz <tmraz>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: juanino, s.traylen, tao, vanhoof
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-20 10:30:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shawn Starr 2006-10-17 22:03:36 UTC
+++ 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.

Comment 1 Shawn Starr 2006-10-17 22:09:56 UTC
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?  

Comment 2 Tomas Mraz 2006-10-20 10:30:30 UTC
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.


Comment 3 Shawn Starr 2006-10-20 23:59:25 UTC
The manpage mentions you do support multiple servers for one NIS domain. Is this
a bug then in the manpage?

Comment 4 Tomas Mraz 2006-10-23 07:16:31 UTC
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.