Dashboard > Penrose 1.2 > ... > Penrose Server User Guide > Network Information Service
Network Information Service
Added by Endi S. Dewata, last edited by Endi S. Dewata on Oct 28, 2008  (view change)
Labels: 
(None)


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:

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

Site running on a free Atlassian Confluence Open Source Project License granted to Safehaus. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators