Bug 211226 - authconfig makes broken yp.conf with multiple nis servers
authconfig makes broken yp.conf with multiple nis servers
Product: Fedora
Classification: Fedora
Component: authconfig (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2006-10-17 18:03 EDT by Shawn Starr
Modified: 2007-11-30 17:11 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-10-20 06:30:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Shawn Starr 2006-10-17 18:03:36 EDT
+++ 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

# 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@redhat.com on 2005-06-09 14:25 EST --
QE ack.  Easily tested and would be good to get fixed.

-- Additional comment from juanino@yahoo.com on 2005-07-08 15:26 EST --
I'm also interested in getting this fixed one day.

-- Additional comment from bugzilla@redhat.com 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.


-- Additional comment from sstarr@platform.com 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 18:09:56 EDT
I am confused about this patch:

--- authconfig-4.6.10/authinfo.c.multiple-nis   2005-02-10 17:26:38.000000000 
+++ 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 06:30:30 EDT
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 19:59:25 EDT
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 03:16:31 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.