Introduction
Starting from version 1.2 Penrose supports an adapter for Network Information Service. With the NIS adapter, all NIS data are translated in real-time into LDAP data. NIS protocol is read-only, so the NIS tree presented by Penrose is also read-only.
Configuring NIS Server
Make sure you have a running NIS server. See Configuring NIS Server.
Configuring NIS Client
Make sure you have a running NIS client. See Configuring NIS Client.
Configuring Penrose Server
First, register the NIS Adapter by adding it into server.xml:
<adapter name="NIS">
<adapter-class>org.safehaus.penrose.nis.NISAdapter</adapter-class>
</adapter>
Then make sure the following schema files are registered:
<schema path="schema/nis.schema"/> <schema path="schema/misc.schema"/>
Next, specify a connection to the NIS server in connections.xml:
<connection name="NIS"> <adapter-name>NIS</adapter-name> <parameter> <param-name>java.naming.factory.initial</param-name> <param-value>com.sun.jndi.nis.NISCtxFactory</param-value> </parameter> <parameter> <param-name>java.naming.provider.url</param-name> <param-value>nis://hostname/domain</param-value> </parameter> <parameter> <param-name>com.sun.jndi.nis.mailaliases</param-name> <param-value>nonull</param-value> </parameter> </connection>
Specify the URL of your NIS server in the java.naming.provider.url parameter. Valid NIS URLs are in these formats:
- nis://hostname/domain
- nis:///domain
- nis:/domain
- nis:domain
If you use Linux NIS server, you need to set the com.sun.jndi.nis.mailaliases parameter to nonull. If you use Solaris NIS server, you should remove this parameter.
Then you can create the following mapping as needed:
- NIS Users
- NIS Groups
- NIS Hosts
- NIS RPCs
- NIS Services
- NIS NetIDs
- NIS Protocols
- NIS Aliases
- NIS Netgroups
- NIS Ethers
- NIS Boot Parameters
- NIS Networks
- NIS Automount
You can also merge serveral NIS maps. See Merging Hosts, Ethers, and Boot Parameters.
Example
You can find the NIS example files in PENROSE_SERVER_HOME/samples/nis directory.
Create a new NIS partition:
cp -r PENROSE_SERVER_HOME/samples/nis/partition PENROSE_SERVER_HOME/partitions/nis
Register the NIS adapter and the NIS partition by adding the following into PENROSE_SERVER_HOME/conf/server.xml:
<partition name="nis" path="partitions/nis"/>
Also make sure that the NIS adapter and NIS schema files are registered in server.xml. See previous section.
References
- The Linux NIS(YP)/NYS/NIS+ HOWTO

- The Network Information System

- NIS Information in the LDAP Directory

- Default Filters Used by LDAP Naming Services

- RFC 2307

- JPAM

- OpenLDAP Everywhere

- Quick autofs Tutorial

- Automount mini-Howto

- HOWTO Auto mount filesystems (AUTOFS)

- How to use AutoFS with OpenLDAP?

- NFS Client Configuration Files

- Configuring the NFS automounter

