Technical article 102425

Known problems and solutions for NIS in SCO OpenServer Release.

OpenServer 6.0.0OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

Problem

This document lists some known problems with NIS in SCO OpenServer and includes several patches or workarounds.

1. Account Manager core dumps when used to administer NIS users; or if using the command line utilities such as passwd, useradd, userdel or usermod to administer NIS users, it fails with errors like the following:

Unable to set password for user <username> Unable to change user password General failure occurred in processing the request External error: NIS password change failed

2. When attempting to set the password of an NIS user on the Master server, the following error message is displayed and the password is not changed:

yppasswd: Couldn't change passwd on <hostname>: error code 3 Password request denied Reason: Remote password change request denied.

3. Local, non-administrative user accounts that are pre-existing before NIS is set up or that are added after NIS is set up are added to the passwd.yp file and treated as distributed users.

This may cause problems if the same local users exist on other systems that are running NIS within the same domain.

For example, if userA exists as a local account on both master and slave, the master will update the password for userA on the slave whenever NIS maps are transferred to the slave.

This may prevent userA from being able to login on the slave.

Cause

There are multiple causes for these problems.

First, SCOadmin Account Manager calls /bin/passwd which calls:

/etc/yp/yppwd.

Then, /etc/yp/yppwd sends some data to passwd which it is not expecting.

This causes SCOadmin Account Manager to core dump.

Second, running ypinit or the NIS user administration utilities (SCOadmin Account Manager, useradd, usermod, userdel) breaks the links on one or more of these files: /etc/passwd, /etc/group, /etc/shadow, /bin/yppasswd and /bin/passwd.

Third, /etc/yp/ypmake and /etc/yp/Makefile do not exclude local users from /etc/passwd.yp, which causes them to be added to passwd.yp.

Fourth, the mode, owner and group are wrong for /etc/passwd.local, passwd.yp, group.local, and group.yp, because these files aren't listed in /etc/auth/system/files (the "File Control Database").

Solution

For OpenServer 5.0.4:
--------------------
A new version of /etc/yp/yppwd that addresses the first and
second problems listed above is available in Support Level
Supplements (SLSs) OSS449F and RS504C.

For Later versions then these issues have been addressed, however, similar problems can be seen with server corruption or issues where servers have been restored manually:

The following additional workarounds can be implemented:

A.  After running ypinit or using any utility to administer NIS user
    accounts, use the SCOadmin Software Manager to find and fix
    missing and broken links.

This will correct the links for /etc/passwd, /etc/group, and /etc/shadow.

However, it may not restore the hard link between /bin/yppasswd and /bin/passwd that ypinit created.

To restore this link do the following:

# cd /bin
# ln ./passwd ./yppasswd
B.  To correct the mode, owner and group settings on the NIS passwd
    and group files, bring the system into single user (maintenance)
    mode.
Then copy:
/etc/auth/system/files to /etc/auth/system/files.fix,

and add the following lines to the file "files.fix":

/etc/passwd.yp:f_owner=bin:f_group=auth:f_mode#0664:f_type=r:chkent:
/etc/passwd.yp-t:f_owner=bin:f_group=auth:f_mode#0664:f_type=r:chkent:
/etc/passwd.local:f_owner=bin:f_group=auth:f_mode#0664:f_type=r:chkent:
/etc/passwd.local-t:f_owner=bin:f_group=auth:f_mode#0664:f_type=r:chkent:
/etc/group.yp:f_owner=bin:f_group=auth:f_mode#0664:f_type=r:chkent:
/etc/group.yp-t:f_owner=bin:f_group=auth:f_mode#0664:f_type=r:chkent:
/etc/group.local:f_owner=bin:f_group=auth:f_mode#0664:f_type=r:chkent:
/etc/group.local-t:f_owner=bin:f_group=auth:f_mode#0664:f_type=r:chkent:
Next, execute:
# cp /etc/auth/system/files.fix /etc/auth/system/files

to copy the new version to the original file.

Run the command "fixmog -i" to find and correct the incorrect mode, owner and group for passwd.* and group.*.

C. As alternatives to installing the new yppwd, you can change NIS user passwords on an NIS slave system, in which case you will be prompted to enter the old password before a new one can be set; OR you can do the following on the NIS master:

For every NIS user whose password you are unable to change, use the usermod command to first make that user non- distributed and then make it distributed. For instance, for a user named "userA" you would run the following commands:

usermod -x "{distributed 0}" userA usermod -x "{distributed 1}" userA

After you do this, you should be able to change userA's password on the NIS master.

NOTE:      NIS can be controlled with the "mkdev nis" command within Single
           User mode.  Once enabled the server needs to be rebooted and you
           should see NIS services starting at boot time.

When you run "passwd" to change a user at the end of the password change you should see the message:

yppasswd: NIS password changed on <master server>.

It can be disabled by running "mkdev nis" again, selecting the
role for the server and when asked whether you would like the NIS
database re-initialised again, select Y to do this.  At this point,
your original configuration is restored and you can then "quit" from
the wizard when prompted to enter the domain name.

From the Xinuos technical article database, record 102425. Reproduced with permission. The original is at www.sco.com/ta/102425, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.