Page 1 of 1

[SOLVED] Upgrade from Mageia 1 to Mageia 2 killed NIS server

PostPosted: Dec 13th, '12, 01:26
by Will94
I have been running an NIS server with four clients for a few years now. This was originally a Mandriva server that I moved to Mageia 1 last summer. All this server does is serve passwords to these four client machines. I don't share any volumes.

As Mageia 1 has now been end-of-lifed, I did an in-place upgrade today to Mageia 2. The upgrade went fine, but at the end, I no longer had an NIS server.

As I went through the steps to create a server, I received a message that portmap had been obseleted by rpcbind, which was already installed. I went through the entire process of creating an NIS Server using rpcbind where I had used portmap before. Everything appeared to go well. I didn't receive any errors, but when I entered 'ypmatch testuser passwd' I received the message 'ymatch: can't get local yp domain: Local domain name not set'.

I have since restored last night's backup so the machine is back up and running on Mageia 1.

I assume that I am missing something simple here and would greatly appreciate any advice on how to upgrade this NIS Server to Mageia 2.


Thank you!

Will N.
Bryan, TX USA

Re: Upgrade from Mageia 1 to Mageia 2 killed NIS server

PostPosted: Dec 13th, '12, 19:34
by Lebarhon

Re: Upgrade from Mageia 1 to Mageia 2 killed NIS server

PostPosted: Dec 13th, '12, 23:06
by Will94
Lebarhon wrote:Hello,

Did you see this bug
https://bugs.mageia.org/show_bug.cgi?id=6014

I had not seen that bug. I assumed that I had made a mistake somewhere. It's kind of disheartening to see such a major bug unresolved.

Thank you for the information though!

Re: Upgrade from Mageia 1 to Mageia 2 killed NIS server

PostPosted: Dec 14th, '12, 09:09
by isadora
Will94 wrote:..............It's kind of disheartening to see such a major bug unresolved.
................

Yeah well, i can imagine your opinion.
But as most of these cases, it probably has very much to do with "(no) hands available".

And so again a great opportunity calling for more power:
https://www.mageia.org/en/contribute/

And for the topic; probably better mark the title as [WIP] (Work in progress), or the likes. ;)

Re: [WIP] Upgrade from Mageia 1 to Mageia 2 killed NIS serve

PostPosted: Dec 20th, '12, 16:58
by wintpe
you will also find if your using NIS for auth that you need to alter the auth in pam.conf

for some reason modern linux's expect you to use something more secure than nis for auth.

cant remember the setting now, but can dig it out if you dont find it.

most of us using NIS use kerberos for auth , instead of the old insecure password files.

regards peter

NB the setting im looking for was pam_tcb.so wont support NIS, this is found in pams system-auth file.

you need to replace this with pam_unix.so if you want it to authorize/authenticate under NIS

Re: [WIP] Upgrade from Mageia 1 to Mageia 2 killed NIS serve

PostPosted: Jan 23rd, '13, 00:32
by Will94
I finally got around to spending some more time on this issue last week, and there is a fix for it. The last post on this https://bugs.mageia.org/show_bug.cgi?id=6014 page has an attachment which is a replacement for /etc/rc.d/init.d/ypbind. Add the lines beginning to '+' to your file, and everything works fine. Surely this change would be easy to push to Mageia 2 users?!?

Code: Select all
  # Source function library.
  . /etc/rc.d/init.d/functions
 
+ # Source network configuration.
+ . /etc/sysconfig/network
+
  RETVAL=0
 
  # See how we were called.
  case "$1" in
    start)
     gprintf "Binding to the NIS domain... "
+    mydomain=`domainname`
+    if [ "$mydomain" = "(none)" ]; then
+       if [ "x$NISDOMAIN" != 'x' ]; then
+          gprintf "$NISDOMAIN\n"
+          domainname $NISDOMAIN
+       else
+          gprintf "\nError: NIS domain not specified.\n"
+          exit 1
+       fi
+    fi
     daemon ypbind
     echo
          # the following fixes problems with the init scripts continuing


Should I change my subject to 'SOLVED'?

Re: [WIP] Upgrade from Mageia 1 to Mageia 2 killed NIS serve

PostPosted: Jan 23rd, '13, 08:11
by isadora
Yeah please do so Will, thanks!!!! ;)