SunService Tip Sheet for SUN NIS+


Revision: 1.3 Date: May 24, 1996
1.0: About NIS+
  1.1: An Explanation of the Basic NIS+ Objects
2.0: Debugging NIS+
  2.1: Authentication Problems
  2.2: Examining NIS+ Tables
  2.3: Using snoop
  2.4: Performance Problems
3.0: Common How Tos
  3.1: How to Prepare Your Site for NIS+
  3.2: How to Set Up a Root NIS+ Master
  3.3: How to Set Up a NIS+ Client
  3.4: How to Set Up a Root NIS+ Replica
  3.5: How to Set Up a Subdomain NIS+ Master
  3.6: How to Set Up a Subdomain NIS+ Replica
  3.7: How to Configure the Root Server for an IP Address Change
  3.8: How to Add a User to the Admin Group
  3.9: How to Change a NIS+ user passwd
  3.10: How to Change a NIS+ root passwd
  3.11: How to Administer NIS+ Credentials
  3.12: How to Administer NIS+ Groups
  3.13: How to Administer NIS+ Tables
  3.14: How to Examine NIS+ tables
  3.15: How to Modify NIS+ Tables
  3.16: How to Regularly Administer NIS+
  3.17: How to Remove NIS+
  3.18: How to define the printer table
4.0: Some Frequently Asked Questions
  4.1: Miscellaneous Questions
  4.2: NIS+ Setup Problems
  4.3: User Login Problems
  4.4: NIS+ Lookup Problems
5.0: Patches
  5.1: Solaris 2.3 NIS+ Patches
  5.2: Solaris 2.4 NIS+ Patches
6.0: Known Bugs & RFEs
7.0: References
  7.1: Important Man Pages
  7.2 Sunsolve Documents
  7.3 Sun Educational Services
  7.4: Solaris Documentation
  7.5: Third Party Documentation
  7.6: RFCs
8.0: Supportability
9.0: Additional Support
1.0: About NIS+ 


NIS+ stands for Network Information Service Plus. It was designed to
replace NIS, and is a default naming service for Solaris. NIS+ can
provide limited support to NIS clients via a YP-compatibility mode.
NIS+ was mainly designed to address problems that NIS cannot address.

One important thing to note is that there is no relation between NIS+
and NIS. The commands and the overall structure of NIS+ are different
from NIS. In addition, some command syntax in NIS+ is different from
the NIS commands. NIS+ was designed from scratch.

NIS+ increases security by using an additional authentication method.
Users will still have their standard LOGIN PASSWORD, will give
them access to the system. They will also have a SECURE RPC PASSWORD
or NETWORK PASSWORD. This new password is necessary to actually access
NIS+, and is what provides the new security. Usually, a user's LOGIN
PASSWORD and NETWORK PASSWORD will be the same, and a user will
automatically have access to all NIS+ functionality when they login
with their login password. However, if they are different, a user will
have to KEYLOGIN and type his network password to get access to NIS+.

There are a huge number of programs related to NIS+. The most
important ones are explained elsewhere in this document. All are
listed in Section 7.1  you should consult the man pages for any
additional information. Of special notes are the NIS+ daemons:

RPC.NISD and NIS_CACHEMGR are the standard NIS+ daemons. You should
see them running on every NIS+ server and client.

1.1: An Explanation of the Basic NIS+ Objects

NIS+ objects are structural elements used to build and define the NIS+
namespace. There are 5 basic NIS+ objects. Objects are always
separated by dots.

DIRECTORY OBJECTS: Similar to a UNIX system directory, in that it can
contain one or more objects such as: table objects, group objects,
entry objects or link objects. Directory objects form an inverted
tree-like structure, with the root domain at the top and the
subdomains branching downwards. They are used to divide namespace into
the different parts. Each main directory object will contain that
domain's org_dir and groups_dir directory objects. The org_dir
directory objects contain table objects for that domain. The
groups_dir directory objects contain NIS+ administrative group
objects.

  Example of DIRECTORY OBJECTS:

  Sun.Com.
  org_dir.Sun.Com.
  groups_dir.Sun.Com.

TABLE OBJECTS: Similar to NIS maps. They store a variety of network
information. Tables may contain zero or more ENTRY OBJECTS. There are
a total 17 predefined table objects. Tables can be administered with
nistbladm or nisaddent command. Table entry objects form a row in the
table and each row stores one record.

  Example of TABLE OBJECTS: 

  Passwd.org_dir.Sun.Com.
  Hosts.org_dir.Sun.Com.

  Example of ENTRY OBJECTS:

  [name=user1],passwd.org_dir.Sun.Com.

GROUP OBJECTS: These are NIS+ namespace administrative user groups. They
permit controlled access rights to namespace modification on a group
basis. They are administered with the nisgrpadm command.

  Example of GROUP OBJECTS:

  admin.groups_dir.Sun.Com.

LINK OBJECTS: These are pointers to other objects. They are similar to
symbolic links. They typically point to table or object entries.
Administered with the nisln command.

2.0 Debugging NISplus

2.0: Debugging NIS+ 


Before trying to debug a NIS+ problem, you should always make sure
that you have the recommended patches installed on the system. In
particular, the kernel patch should be at the current patch level, and
all the systems have the same patch rev. 

2.1: Authentication Problems

Most of the problems in NIS+ are authentication related problems.
Assuming that you are running rpc.nisd at security level 2 on your
master server, you can use niscat to determine if a user is
authenticated:

  %% niscat passwd.org_dir

If the user can see the encrypted passwords, then the user is
authenticated. If the user sees *NP* in place of encrypted passwords,
then he does not have permission to read the passwd column. In this
case, you could run 'keylogin' to try and reauthenticate the user. If
that works, the user might need to run 'chkey' to sync his login and
network passwords.

If keylogin still does not authenticate the user, it is likely that
his credentials have not been set up correctly. You can check that
someone actually has credentials by examining the cred table:

  %% niscat cred.org_dir

You can create credentials for a user with nisclient:

  %% nisclient -c username

When having credential problems, also consider that it might be a
problem with the credentials of the workstation as well. If known-good
users fail on a specific workstation, you will probably want to try
and set the workstation back up, as described in Section 3.3.
2.2: Examining NIS+ Tables

Some NIS+ problems will be related to information missing from tables.
You can examine the contents of tables with a variety of commands.

niscat will output the entire contents of a table for you:

  %% niscat passwd.org_dir

You can also examine the object properties of a table:

  %% niscat -o passwd.org_dir

This can be very helpful, because it will show you if a table has
weird permissions which may be restricting access.

nismatch can also be used to find things in a table:

  %% nismatch -h joe passwd.org_dir

niscat and nismatch both directly access the NIS+ tables. getent, on
the other hand, will look up tables in the order defined in the
/etc/nsswitch.conf. A typical getent command would be the following:

  %% getent passwd joe

This would look up the user joe in passwd. In a typical environment,
it would access files first, and then NIS+. If you find that getent
and nismatch give you different answers, you should look at your
nsswitch.conf. Perhaps a naming service that is listed earlier in your
nsswitch.conf has different info. Alternatively, maybe NIS+ is not
listed at all in your nsswitch.conf.
2.3: Using Snoop

If you are having intermittent problems, snoop is often useful to
debug them. To use snoop correctly, you must run it from an uninvolved
machine. For example, if you have a client that is having intermittent
problems with NIS+, you should run snoop on a machine on the same
subnet as the problem client, but the machine must be neither the
client nor any of the NIS+ servers:

  unrelated-machine# snoop problem-machine

This will tell you about all of the packets going in and out of the
problem-machine. You should look for NIS+ packets, taking careful
notes of errors. If you are getting some type of intermittent errors,
it is useful to see which Server your Client was talking with at the
time of your problem. Possibly one of your Servers has bad or old
information?
2.4: Performance Problems

Some NIS+ problems may be related to performance. You might find NIS+
servers overloaded. You might get "NIS+ Server Unreachable" errors
because your network is overloaded. The commands 'snoop' and 'netstat'
may be used to examine such problems further, but Performance Tuning
is beyond the scope of the help that SunService can provide. Sections
8.0 and 9.0 explain other places you can get help from within Sun.
3.0 Common How Tos

3.1: How to Prepare Your Site for NIS+

Before configuring NIS+ namespace you need to do initial planning
including: verifying hardware and software requirements, deciding the
name of the domain, determining security level and planning your
domain hierarchy.

In general you need a solaris 2.3 or higher Operating system. 32 to 64
MB of memory and about 128 MB of swap space is recommended for a
medium to large domain. The size of /var/nis is recommended to be
about 20 MB. All of these requirements can be found in the
Administering Name Services Manual (see Section 7.4).

The domainname for the root server should be at least two labels long.
This means that the domain name "xyz." is not supported, but the
domainname "xyz.com." is a correct domain name.

Another thing to think about is security level. The default security
level is 2. If you want a secure environment, then you should run NIS+
at security level 2. If you have SunOS client machines on the network,
which are going to get served by the NIS+ server, then you need to run
NIS+ in YP compatibility mode. You should also decide about the access
rights you want to give to users and administrative group.

Lastly, you should learn about important NIS+ concepts such as the
difference between the login passwd and the network passwd. It's very
important to know this difference while troubleshooting authentication
related problems.

Once you are ready to begin configuring your domain, it is recommended
that you use the quick startup scripts to configure NIS+ namespace.
For example, to configure the root server use the nisserver script  to
configure clients use the nisclient script. These scripts are easy to
use and reduce chances for errors. The following Sections outline the
use of these scripts.
3.2: How to Set Up a Root NIS+ Master

To set up a root server, become the superuser on the root master, and
use the nisserver script to build the root domain:

  root-server# nisserver -v -r -d domain_name

(where domain_name is your NIS+ domain.)

Afterwards, you will want to populate the NIS+ tables from a set of
ASCII files. It is a good idea to create a separate directory and then
edit the files required to populate the tables there.

For example, create a directory /var/tmp/nisfiles and copy the files
from the /etc directory to /var/tmp/nisfiles, and then edit the files.
You may wish to edit the passwd file, for example, because you only
need the entries for the normal users in the NIS+ passwd table.

Following is the list of standard NIS+ tables, which you may wish to
include when you populate your maps (although it is not required that
they all be included):

  aliases
  auto_home
  auto_master
  bootparams
  cred
  group
  hosts
  netgroups
  netmasks
  networks
  passwd
  protocols
  rpc
  services
  timezone

To populate the tables, change to the directory where the edited files
are, and then run the nispopulate script:

  root-master# cd /var/tmp/nisfiles
  root-master# nispopulate -v -F  

One important thing to note is the network passwd created in the
credential table for all the users is "nisplus". This should be
changed to something more secure. For normal users, every user needs
to run keylogin and then do the chkey command and enter a new network
passwd. It is highly recommended that login passwd and the network
passwd be the same. In the NIS+ environment, login explicitly runs
keylogin and so, if the network passwd is same as the login passwd,
users don't have to do a separate keylogin to authenticate.

When the nispopulate is done, you should reboot your server. When it
comes back up, you can verify that NIS+ is working correctly by
running the standard NIS+ commands:

  root-master%% nisls
  root-master%% niscat passwd.org_dir
3.3: How to Set Up a NIS+ Client

To set up a NIS+ client, first become root on the master server, and
verify that NIS+ host table has an entry for the client. If it does
not, use admintool to add it. Afterwards, run the nisclient script to
create credentials for the client machine:

  root-master# nisclient -v -d domain_name -c client_machine

(where domain_name is your NIS+ domain, and client_machine is the name
of your new client.)

Do not worry if nisclient tells you that the credentials already exist
for your client_machine.

Next, login to your client machine as root, and run nisclient to
initialize it:

  client# nisclient -v -i -h master_machine -a master_ip -d domain_name

(where master_machine is the name of your NIS+ master, master_ip is
the IP address of your NIS+ master and domain_name is the name of your
NIS+ domain.)
3.4: How to Set Up a Root NIS+ Replica

After your root replica has been set up as a client system (see
Section 3.3), start the NIS+ server daemon:

  root-replica# rpc.nisd

Then, you can execute the nisserver command on the root-master:

  root-master# nisserver -v -R -d domain_name -h replica_machine

(where domain_name is your NIS+ domain and replica_machine is the name
of your root-replica.)

Finally, run nisping on the master server to propagate the tables to
the replica server:

  root-master# nisping domain_name.
  root-master# nisping org_dir.domain_name.
  root-master# nisping groups_dir.domain_name.

(where domain_name is your NIS+ domain.)
3.5: How to Set Up a Subdomain NIS+ Master

The subdomain server must already be setup as a client of the domain
above it (see Section 3.3). This may be the root domain, or some
subdomain. After it is, you should start rpc.nisd:

  subdomain-master# rpc.nisd

Then, you should login to the master of the domain above your current
domain, and execute nisserver (root-master is used in this example,
but this could also be some higher subdomain-master):

  root-master# nisserver -v -M -d subdomain_name -h subdomain_master

(where subdomain_name is the name of your new NIS+ subdomain, and
subdomain_master is the name of your Subdomain master.)

You will then want to populate the NIS+ tables for your new Subdomain.
This is done on your subdomain master, in a similar manner to that
described in Section 3.2:

  subdomain-master# cd /var/tmp/nisfiles
  subdomain-master# nispopulate -v -F  

Afterwards, reboot your new subdomain master.
3.6: How to Set Up a Subdomain NIS+ Replica

The same procedure as is described in Section 3.4, should be used to
set up a Subdomain Replica. However, the commands will be run on the
subdomain-master, not the root-master.
3.7: How to Configure the Root Server for an IP Address Change

Unfortunately, there is no easy way to configure the root server again
when the IP address is changed. This is because the clients maintain
the server's IP address in their cold start file, and the server has
the old IP address in its cache. You must totally reinitialize the
Root Server for an IP address change.

The best way to do this is first dump the NIS+ tables to ASCII files
using the nisaddent command:

  root-master# cd /var/tmp/nisfiles
  root-master# nisaddent -d aliases > aliases
  root-master# nisaddent -d bootparams > bootparams
  root-master# nisaddent -d ethers > ethers
  root-master# nisaddent -d group > group
  root-master# nisaddent -d hosts > hosts
  root-master# nisaddent -d netgroup > netgroup
  root-master# nisaddent -d netid > 
  root-master# nisaddent -d netmasks > netmasks
  root-master# nisaddent -d networks > networks
  root-master# nisaddent -d passwd > passwd
  root-master# nisaddent -d protocols > protocols
  root-master# nisaddent -d publickey > publickey
  root-master# nisaddent -d rpc > rpc
  root-master# nisaddent -d services > services
  root-master# nisaddent -d shadow > shadow
  root-master# nisaddent -d timezone > timezone
  root-master# nisaddent -d -t auto_home.org_dir key-value > auto_home
  root-master# nisaddent -d -t auto_master.org_dir key-value > auto_master

Then, you must clean out old NIS+ info:

  root-master# cp /etc/nsswitch.nisplus /etc/nsswitch.conf
  root-master# /etc/init.d/rpc stop
  root-master# rm -f /etc/.rootkey
  root-master# rm -rf /var/nis/*
  root-master# /etc/init.d/rpc start

And finally, you can reconfigure your NIS+ server, as described in
Section 3.2.
3.8: How to Add a User to the Admin Group

In your default setup, only root on your master machine will be able
to make modifications to most of your NIS+ maps. You will probably
want to extend these permissions to all of the system administrators.
This is typically done by putting all of the system administrators
into the admin group:

  # nisgrpadm -a admin.domain_name. joe
  # nisgrpadm -a admin.domain_name. liz

The above command will give joe and liz the ability to modify most
NIS+ tables from their own accounts. This can give considerable
privilege, so you should make sure that joe and liz are trusted, and
also that their accounts are secure.
3.9: How to Change a NIS+ user passwd

The passwd for a normal user can be changed by them running the
nispasswd command:

  %% nispasswd

This updates the password in the passwd table, and also updates the
credential table. 

Root can change passwords for users by running:

  # nispasswd user_name

However, this procedure should NEVER be used for changing the root passwd.
3.10: How to Change a NIS+ root passwd

To change a root passwd, you MUST use the following procedure.

First, issue the passwd command, and supply new passwd:

  # passwd

This will change the passwd in the local /etc/passwd file. Then, run
chkey -p and enter the new network passwd:

  # chkey -p

Finally, do keylogin -r to update /etc/.rootkey file with the new
private key for the server:

  # keylogin -r

This changes the private key for the server, while the public key
remains the same. This is necessary because clients use server's
public key for authentication. 

If you use any other method for updating your root passwd, you can
totally mess up your NIS+ domain.
3.11: How to Administer NIS+ Credentials

The nisaddcred command can be used to create, update and remove LOCAL
and DES credentials.

To create or update credentials for another NIS+ principal:

  %% nisaddcred -p uid -P principal-name local
  %% nisaddcred -p rpc-netname -P principal-name des

The rpc-netname is unix.uid@domain_name for a user, and
unix.hostname@domain_name for the root user on a host. Note that these
domainnames do NOT contain a trailing dot, unlike most NIS+ commands.
The principal-name is name.domain_name., where name can be user name
or a hostname.

For example, joe (uid 555) in the example.com domain has the following
names:

  principal-name:       joe.example.com.
  rpc-netname:          unix.555@example.com

While root on the machine test has the following names:

  principal-name:       test.example.com.
  rpc-netname:          unix.test@example.com

A few caveats: you can only create DES credentials for a client
workstation. DES credentials may only be created in the client's home
domain. However, you can create LOCAL credentials for a client user in
other domains.

To remove credentials:

 %% nisaddcred -r principal-name
3.12: How to Administer NIS+ Groups

The following commands may all be used to administer NIS+ groups. Be
aware that NIS+ groups are not the same thing as normal UNIX groups.

You can list the object properties of a group with niscat:

  %% niscat -o group-name.groups_dir.domain_name.

The nisgrpadm command creates, deletes and performs miscellaneous
administration operations on the nis+ groups.

To create a group:

  %% nisgrpadm -c group-name.domain_name.

The group you create will inherit all the object properties specified
in the NIS_DEFAULTS variable. You can view the defaults using the
nisdefaults command:

  root-master# nisdefaults
  principal name : master.domain_name
  domain name : domain_name
  Host Name   : master.domain_name
  Group Name: 
  Access Rights  : ----rmcdr---r---
  Time to live   :12:0:0
  Search Patch : domain-name

To delete a group:

  %% nisgrpadm -d group-name.domain_name.

To list the group members:

  %% nisgrpadm -l group-name.domain_name.

To add members to a NIS+ group:

  %% nisgrpadm -a group-name member

To remove members from a NIS+ group:

  %% nisgrpadm -r group-name member

To determine if a member belongs to a NIS+ group:

  %% nisgrpadm -t group-name member
3.13: How to Administer NIS+ Tables

The nistbladm command is the primary NIS+ table administration
utility. With this command, you can create, modify or delete tables
and table entries. To create a table you must have create rights to
the directory under which you will create. To delete a table you must
have a destroy rights to the directory. To modify a table, or to add,
change or delete the entries you must have modify rights to the table
or the entries.

Table column can have following characteristics:

  S Searchable 
  I case insensitive
  C encrypted

To create a table:

  %% nistbladm -c table-type column-spec .... table-name

For example, to create a table of type 'computers' and of name
'computers.example.com.', with two columns, 'name' and 'model', which
are both searchable, you would use the following command:

  %% nistbladm -c computers name=S model=S computers.example.com.

(assuming your domain_name is example.com)

To delete a table:

  %% nistbladm -d table-name

For example, to delete your computers table, you would use the following command:

  %% nistbladm -d computers.example.com.

For more info about adding entries or modifying entries, refer to the
nistbladm man page.
3.14: How to Examine NIS+ tables

The niscat command displays the contents of NIS+ tables.

To display the object properties of a table:

  %% niscat -o table-name

Or:

  %% niscat -o entry

To display the contents of a table:

  %% niscat -h table-name
3.15: How to Modify NIS+ Tables

NIS+ tables may be modified in a number of ways. One note for all of
these methods is that a NIS+ principal must be a member of the admin
NIS+ group for them to make modifications to most tables (see Section
3.8).

The best method is to use the admintool GUI to modify them. The only
downsides to this approach are: admintool requires X to be running 
not all the standard tables are available through admintool  and new
tables will never be available through admintool.

If you can not use admintool to modify a table, nisaddent is the best
alternative. The nisaddent command loads information from text files
or from NIS maps into NIS+ tables. It can also dump the contents of
the NIS+ tables back to text files. The following options are used
along with the nisaddent command:

  -a append: add the contents of the source to the table
  -r replace: substitute contents of the source for the contents of the table
  -m merge: merge the contents of the source with the contents of the table.
  -d dump : dump the contents of the table to stdout

(With no -a, -r or -m options, the default is REPLACE)

You can put new entries into a file, and then merge those changes in:

  %% nisaddent -m -f filename table-type

For example:

  %% nisaddent -m -f /etc/hosts hosts

Or, you could dump a table, make changes and then replace the copy of
the table in NIS+

For example:

  %% nisaddent -d hosts > /tmp/hosts
  %% vi /tmp/hosts
  %% nisaddent -r -f /etc/hosts hosts

There is a special case to modify the password table using nisaddent.

Example:

  %% nisaddent -d passwd > /tmp/passwd
  %% nisaddent -d shadow > /tmp/shadow
  %% vi /tmp/passwd
  %% nisaddent -r -f /tmp/passwd passwd
  %% nisaddent -m -f /tmp/shadow -t passwd.org_dir shadow

The reason that you must do the passwd table this way is that is you don't
reload all the shadow information your passwords will be lost.

If you do not want to use nisaddent, your final option is to use
nistbladm to directly modify the table. This can be fairly complex.
Examine the nistbladm man page for more information on how to do so.
3.16: How to Regularly Administer NIS+

Depending on the updates one performs in the namespace, it is a good
idea to frequently perform nisping -C so that log files gets written
to the disk. You may wish to put this into a cron tab on your
root-master server, to make sure that it is executed daily.

Another important NIS+ administration task is to regularly backup
/var/nis, to make sure that you can recover in the case of a massive
failure.
3.17: How to Remove NIS+

If you wish to remove NIS+, you should run the following commands on
all of your NIS+ machines:

  # cp /etc/nsswitch.files /etc/nsswitch.conf
  # /etc/init.d/rpc stop
  # rm -f /etc/.rootkey
  # rm -rf /var/nis/*
  # rm -rf /etc/defaultdomain
  # /etc/init.d/rpc start
  
It is suggested that you start with the clients, and do the servers
last.
3.18:  How to define the printer table in NIS+
Run the following command, as root, to set up the NIS+ printers table
definition:

# nistbladm -c -D access=n+r,o+rmcd,g+rmcd,w+r printers printer_name=S,o+rmcd,g+r,w+r printer_host=S,o+rmcd,g+r,w+r  description=,o+rmcd,g+r,w+r printers.org_dir.`domainname`.

Once you have set up this definition, you can confirm the permissions
are set properly:

 # niscat -o printers.org_dir
 Object Name   : printers
 Owner         : ppp.hans.com.
 Group         : admin.hans.com.
 Domain        : org_dir.hans.com.
 Access Rights : r---rmcdrmcdr---
 Time to Live  : 12:0:0
 Object Type   : TABLE
 Table Type          : printers
 Number of Columns   : 3
 Character Separator :
 Search Path         :
 Columns             :
         [0]     Name          : printer_name
                 Attributes    : (SEARCHABLE, TEXTUAL DATA, CASE SENSITIVE)
                 Access Rights : ----rmcdr---r---
         [1]     Name          : printer_host
                 Attributes    : (SEARCHABLE, TEXTUAL DATA, CASE SENSITIVE)
                 Access Rights : ----rmcdr---r---
         [2]     Name          : description
                 Attributes    : (TEXTUAL DATA)
                 Access Rights : ----rmcdr---r---

After this, Admintool or the nisaddent command can be used to populate
the printers table.

4.0 Some Frequently Asked Questions

4.1: Miscellaneous Questions

Q1: What are the main features of NIS+?
Q2: What new functionality does NIS+ have?
Q3: What are the differences between NIS and NIS+?

A: NIS name space is a flat namespace, which means that it does not
support subdomains. Under NIS, only one domain is accessible from a
given host. In NIS+, the namespace is hierarchical. This hierarchical
structure is similar to the UNIX filesystem structure. Since the NIS+
namespace is hierarchical, it can be configured to conform with the
logical hierarchy of the organization. This means that you can create
subdomains for different levels of organizations.

In NIS, even for a small change in the map, the master server needs to
push the whole map to the slave servers. Whereas, in NIS+, the
database updates are incremental. This means that only changes in the
map are replicated to replica servers. Therefore, NIS+ database
updates are more efficient and less time consuming.

Another important difference between NIS and NIS+ is server binding.
In NIS, clients are hard bound to a specific server. During the bootup
time, the ypbind process on the client side binds to a specific
server. However, the NIS+ client library is not a separate process.
In NIS, the ypwhich command can tell you to which specific server the
client is bound to, but that is not possible in NIS+. In other words,
the binding in nis+ is soft binding.

NIS maps can be searched by only one predefined searchable column.
NIS+ tables allow more than one searchable columns.

NIS supports UNIX groups and netgroups. NIS+ also supports the concept
of NIS+ group. One or more NIS+ users can be grouped together into a
NIS+ group. Multiple NIS+ groups can be defined, each with different
access and modification rights to the NIS+ namespace.

NIS+ also has much improved security:

NIS does not support authentication, authorization and secure RPC,
whereas NIS+ supports authentication, authorization and secure RPC.

Q: What is my network passwd?

A: In most cases, your network passwd should be the same as your login
passwd. When NIS+ is just getting setup, network passwords are often set
to 'nisplus'.

Q: Why can't I have machines and users with the same name?

A: All machines and users must have credentials created for them. If
you have a machine and a user with the same name, only one of them
will be able to have credentials. In case of a naming conflict of this
sort, you should change the machine's name  you may have to recreate
credentials for the user and machine afterwards:

  %% nisclient -c user
  %% nisclient -c machine
4.2: NIS+ Setup Problems

Q: Why does nisserver fail when I run it, as described in Section 3.4?

A: If for some reason the nisserver script fails, check the error
message. It will give some ideas about the failure. Another option is
to do the configuration manually using nisinit, and nissetup, as is
described in the Name Services Administration Guide. This will give an
idea about which step the script is failing in. This can help to
diagnose the problem better. If the nisinit -r step hangs, then check
if you are running DNI. The DNI installation modifies /etc/netconfig
file with this line:

  nsp   tpi_cots_ord    -       decnet  nsp     /dev/nsp        /usr/lib/straddr.so

If you comment this line out and then run the script again, it will
work correctly.
4.3: User Login Problems

Q: Why do I get the following error on login:

  "Password does not decrypt secret key for ..."

A: This means that the user's login password and network password do
not match. After login, the user must run keylogin to get their NIS+
credentials:

  %% keylogin

They will have to type their NIS+ network password at the keylogin
prompt. This may very well be 'nisplus' if the user is logging in for
the first time. Afterwards, the user should run chkey, to synchronize his
login and network passwords:

  %% chkey -p

They have to again type their NIS+ network password (nisplus) and
then their login password (password typed in when logging into
system)

Q: Why do I get the following error on login:

  "/usr/bin/passwd:   does not exist"
  "Connection closed by foreign host."

A1: This can be the result of selecting "cleared until first login" in
admintool, when you initially create a user. You should instead select
a normal password for a user when you create his account.

A2: If you are trying to use password aging, you must install the
password aging point patch, as noted in Section 5.0.

Q: Why can't I log in via xdm?

A: This is a known bug. Sections 5.3 and 5.4 list the patches for this
problem.
4.4: NIS+ Lookup Problems

Q: Why do I get inconsistent results when I do certain NIS+ lookups?

A: In NIS+, the server binding is a soft binding. That is, every query
may be accessing a different server. Therefore, if a replica is not in
sync with the master, clients will get inconsistent information for
every query. When you get inconsistent information for queries run the
snoop command (see Section 2.3) to find out which server is providing
the incorrect information.


5.0 Patches

5.0: Patches
 
The following is the list of all of the NIS+ patches for 5.3 and 5.4.
If you are having NIS+ problems, installing the patches is a good
place to start, especially if you recognize the general symptoms noted
below.
 
In order for a machine to be stable, all of the recommended patches
should be installed as well. The list of recommended patches for your
operating system is available from sunsolve1.sun.com.5.1: Solaris 2.x NIS+ Patches
 
Solaris 2.3 NIS+ Patches

101318-81 SunOS 5.3: Jumbo patch for kernel (includes libc, lockd)  

  An important patch that should be installed on any machines. Since
  it contains a large number of NIS+ fixes, it is an absolute
  necessity for a NIS+ machine.
 
101384-08 SunOS 5.3: Admintool Jumbo patch  
 
  Fixes a large number of bugs related to NIS+ and admintool. This
  patch must be installed if you use admintool to modify your NIS+
  databases.
 
101582-03 SunOS 5.3: POINT PATCH: Password aging & NIS+ don't work (together)  
 
  This optional patch should be installed only if you want to
  combine NIS+ and password aging.
 
101736-03 SunOS 5.3: nisplus patch  
 
  Fixes errors in the NIS+ library. Should be installed on all NIS+
  machines.
 
102447-01 OpenWindows 3.3: xdm cannot be used on NIS+ networks  
 
  Corrects a bug which prevented NIS+ users from logging in via xdm.
 

5.2: Solaris 2.4 NIS+ Patches
 
101945-42 SunOS 5.4: jumbo patch for kernel  
 
  An important patch that should be installed on any machines. Since
  it contains a large number of NIS+ fixes, it is an absolute
  necessity for a NIS+ machine.
 
102294-01 OpenWindows 3.4: xdm cannot be used on NIS+ networks  

  Corrects a bug which prevented NIS+ users from logging in via xdm.

101973-20 SunOS 5.4: fixes for libnsl and ypbind  

  This is a required patch for nis+.

102277-02 SunOS 5.4: nss_nisplus.so.1 fixes  

102153-04 SunOS 5.4: Admintool Jumbo patch  

102273-01 SunOS 5.4: nisupdkeys -a does not deal properly with multi-homed systems  

102336-01 SunOS 5.4: POINT PATCH: 1091205 - Password aging & NIS+ don't work  
 
  This optional patch should be installed only if you want to
  combine NIS+ and password aging.

102521-01 SunOS 5.4: rpc.nisd leaks one file descriptor each checkpoint request  
               *** OBSOLETED BY 101973-15 or later

102677-01 SunOS 5.4: nispasswd coredumps in mailoc with SEGV  

102608-03 SunOS 5.4: nisaddent and nispopulate fixes  

103064-01 SunOS 5.4: nis_cachemgr fixes  


5.3:  Solaris 2.5 NIS+ Patches

103060-02 SunOS 5.5: nis_cachemgr fix  

atch-ID#  SunOS 5.5: rpc.nisd hangs in write(2)  

103279-02 SunOS 5.5: nscd breaks passwd shadowing with NIS+ 
6.0: Known Bugs & RFEs 


There are no known open issues on NIS+.

 
7.0 References

7.1: Important Man Pages

  chkey
  keylogin
  newkey
  nis
  nis_cachemgr
  nisaddcred
  niscat
  nisaddent
  nischgrp
  nischown
  nischttl
  nisclient
  nisdefaults
  nisgrep
  nisgrpadm
  nisinit
  nislog
  nisls
  nismatch
  nismkdir
  nisping
  nispopulate
  nisrm
  nisrmdir
  nisserver
  nistbladm
  nisudpkeys
  rpc.nisd
7.2: Sunsolve Documents

There are a number of SunSolve documents concerning NIS+ The ones
listed below either contain some additional information not in this
document, or reference rare problems, or rare how-tos.

7.2.1: FAQs

1012   NIS+ questions

7.2.2: Infodocs

2216   NIS+ questions
11742  How to convert a NIS+ root replica server to a root mas

7.2.3: SRDBs

5874   nis+ database recovery
6285   change of root passwd on NIS+ server breaks authenticat
6487   differences between NIS and NIS+
6640   why does NIS+ require passwords
6616   is it possible to revert to NIS
7202   cannot change NIS passwords served by NIS+ servers
10448  Changing the NIS+ master server.
10941  NIS+ error messages
10951  NIS+ servers unreachable
11728  Changing a NIS+ server's IP address.
7.3: Sun Educational Services

NIS+ concepts and administration offered by SUNED (contact 1-800 number to get 
more information)

7.4: Solaris Documentation

_Name Services Administration Guide_, part #801-6633-10
_Name Services Configuration Guide_, part #801-6635-10

7.5: Third Party Documentation

_All About Administering NIS+_, by Rick Ramasey,  Prentice Hall

7.6: RFCs


There are no RFCs on NIS+.

8.0 Supportability 


SunService is not responsible for the initial configuration of your
NIS+ environment. In addition, SunService can not diagnose your NIS+
performance problems, or suggest NIS+ tuning guidelines.

We can help resolve problems where NIS+ is not behaving correctly, but
in such cases the contact must be a system administrator who
understands how the NIS+ domain is setup.

9.0 Additional Support 


For initial configuration, or NIS+ performance tuning guidelines,
please contact your local SunService office for possible consulting
offerings. Sun's Customer Relations organization can put you in touch
with your local SunIntegration or Sales office. You can reach Customer
Relations at 800-821-4643.