<?Pub UDT _bookmark _target?><?Pub EntList bsol dash hellip gt lt minus?><chapter id="sundssetup-13"><?Pub Tag atict:info tracking="off" ref="0"?><title>Setting Up Sun Java System Directory Server With LDAP Clients (Tasks)</title><highlights><para>This chapter describes how to configure Sun Java System Directory Server (formerly Sun ONE Directory Server)
to support a network of Solaris LDAP naming services clients. The information
is specific to the Sun Java System Directory Server.  For information about installing and configuring
the directory server, see the Sun Java System Directory Server documentation, that is included
with the Sun Java Enterprise System.</para><note><para>You must have already performed all the procedures described in
the installation and configuration documentation that shipped with your Sun Java System Directory Server before
you can configure Sun Java System Directory Server to work with Solaris LDAP clients.</para>
</note><note><para>A directory server (an LDAP server) <emphasis>cannot</emphasis> be
its own client.</para>
</note><para>This chapter covers the following topics.</para><itemizedlist><listitem><para><olink targetptr="sundssetup-233" remap="internal">Configuring Sun Java System
Directory Server Using idsconfig</olink></para>
</listitem><listitem><para><olink targetptr="sundssetup-1" remap="internal">Using Service Search Descriptors
to Modify Client Access to Various Services</olink></para>
</listitem><listitem><para><olink targetptr="sundssetup-33" remap="internal">Running idsconfig</olink></para>
</listitem><listitem><para><olink targetptr="sundssetup-70" remap="internal">Populating the Directory
Server Using ldapaddent</olink></para>
</listitem><listitem><para><olink targetptr="sundssetup-27" remap="internal">Managing Printer Entries</olink></para>
</listitem><listitem><para><olink targetptr="sundssetup-26" remap="internal">Populating the Directory
Server With Additional Profiles</olink></para>
</listitem><listitem><para><olink targetptr="sundssetup-31" remap="internal">Configuring the Directory
Server to Enable Account Management</olink></para>
</listitem><listitem><para><olink targetptr="sundssetup-40" remap="internal">Migrating Your Sun Java System
Directory Server</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="sundssetup-233"><title>Configuring Sun Java System Directory Server Using <command>idsconfig</command></title><sect2 id="sundssetup-234"><title>Creating a Checklist Based on Your Server
Installation</title><para><indexterm><primary>Sun Java System Directory Server</primary><secondary>setup using <command>idsconfig</command></secondary></indexterm>During the server installation process,
you will have defined crucial variables, with which you should create a checklist
similar to the one below before launching <literal>idsconfig</literal>. You
can use the blank checklist provided in <olink targetptr="schemas-16" remap="internal">Blank
Checklists</olink>.</para><note><para>The information included below will serve as the basis for all
examples that follow in the LDAP related chapters. The example domain is of
an widget company, Example, Inc. with stores nationwide. The examples will
deal with the West Coast Division, with the domain west.example.com</para>
</note><table frame="all" id="sundssetup-tbl-235"><title>Server Variables Defined</title><tgroup cols="2" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="50*"/><colspec colname="colspec1" colwidth="50*"/><thead><row><entry><para>Variable</para>
</entry><entry><para>Definition for Example Network</para>
</entry>
</row>
</thead><tbody><row><entry><para>Port number at which an instance of the directory server is installed</para>
</entry><entry><para>389 (default)</para>
</entry>
</row><row><entry><para>Name of server </para>
</entry><entry><para><userinput>myserver</userinput> (from the FQDN myserver.west.example.com
or 192.168.0.1)</para>
</entry>
</row><row><entry><para>Replica server(s) (IPnumber:port number)</para>
</entry><entry><para><userinput>192.168.0.2</userinput> [for myreplica.west.example.com]</para>
</entry>
</row><row><entry><para>Directory manager</para>
</entry><entry><para>cn=directory manager (default)</para>
</entry>
</row><row><entry><para>Domain name to be served </para>
</entry><entry><para><userinput>west.example.com</userinput> </para>
</entry>
</row><row><entry><para>Maximum time (in seconds) to process client requests before timing out</para>
</entry><entry><para><option></option><userinput>1</userinput><option></option></para>
</entry>
</row><row><entry><para>Maximum number of entries returned for each search request</para>
</entry><entry><para><option></option><userinput>1</userinput><option></option></para>
</entry>
</row>
</tbody>
</tgroup>
</table><note><para>If you are using hostnames in defining <literal>defaultServerList</literal> or <literal>preferredServerList</literal>, you MUST ensure LDAP is not used for hosts
lookup.  This means <literal>ldap</literal> must not be in <filename>/etc/nsswitch.conf</filename> <literal>hosts</literal> line.</para>
</note><table frame="all" id="sundssetup-tbl-236"><title>Client Profile Variables
Defined</title><tgroup cols="2" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="50*"/><colspec colname="colspec1" colwidth="50*"/><thead><row><entry><para>Variable</para>
</entry><entry><para>Definition for Example Network</para>
</entry>
</row>
</thead><tbody><row><entry><para>Profile name (the default name is default)</para>
</entry><entry><para><userinput>WestUserProfile</userinput></para>
</entry>
</row><row><entry><para>Server list (defaults to the local subnet)</para>
</entry><entry><para><userinput>192.168.0.1</userinput></para>
</entry>
</row><row><entry><para>Preferred server list (listed in order of which server to try first,
second, and so on)</para>
</entry><entry><para><userinput>none</userinput></para>
</entry>
</row><row><entry><para>Search scope (number of levels down through the directory tree. '<literal>One</literal>', the default, or '<literal>Sub</literal>')</para>
</entry><entry><para><userinput>one</userinput> (default)</para>
</entry>
</row><row><entry><para>Credential used to gain access to server. Default is <literal>anonymous</literal></para>
</entry><entry><para><userinput>proxy</userinput></para>
</entry>
</row><row><entry><para><indexterm><primary>Referrals</primary></indexterm>Follow Referrals?
( a pointer to another server if the main server is unavailable) Default is <literal>no</literal>.</para>
</entry><entry><para><userinput>Y</userinput></para>
</entry>
</row><row><entry><para>Search time limit (default is 30 seconds) for waiting for server to
return information.</para>
</entry><entry><para><userinput>default</userinput></para>
</entry>
</row><row><entry colname="colspec0"><para>Bind time limit (default is 10 seconds) for contacting the server. </para>
</entry><entry colname="colspec1"><para><userinput>default</userinput></para>
</entry>
</row><row><entry colname="colspec0"><para>Authentication method Default is <literal>none</literal>.</para>
</entry><entry colname="colspec1"><para><userinput>simple</userinput></para>
</entry>
</row>
</tbody>
</tgroup>
</table><note><para>Client profiles are defined per domain. At least one profile must
be defined for a given domain.</para>
</note><sect3 id="sundssetup-10"><title>Attribute Indexes</title><para><indexterm><primary>index LDAP client attributes</primary></indexterm><command>idsconfig</command> indexes the following list of  attributes for improved
performance.</para><variablelist><varlistentry><term><literal>membernisnetgroup</literal></term><listitem><para><literal>pres,eq,sub</literal></para>
</listitem>
</varlistentry><varlistentry><term><literal>nisnetgrouptriple</literal></term><listitem><para><literal>pres,eq,sub</literal></para>
</listitem>
</varlistentry><varlistentry><term><literal>ipHostNumber</literal></term><listitem><para><literal>pres,eq,sub</literal></para>
</listitem>
</varlistentry><varlistentry><term><literal>uidNumber</literal></term><listitem><para><literal>pres,eq</literal></para>
</listitem>
</varlistentry><varlistentry><term><literal>gidNumber</literal></term><listitem><para><literal>pres,eq</literal></para>
</listitem>
</varlistentry><varlistentry><term><literal>ipNetworkNumber</literal></term><listitem><para><literal>pres,eq</literal></para>
</listitem>
</varlistentry><varlistentry><term><literal>automountkey</literal></term><listitem><para><literal>pres,eq</literal></para>
</listitem>
</varlistentry><varlistentry><term><literal>oncRpcNumber</literal></term><listitem><para><literal>pres,eq</literal></para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
</sect2><sect2 id="sundssetup-238"><title>Schema Definitions</title><para><olink targetdoc="group-refman" targetptr="idsconfig-1m" remap="external"><citerefentry><refentrytitle>idsconfig</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> automatically
adds the necessary schema definitions. Unless you are very experienced in
LDAP administration, do not manually modify the server schema. See <olink targetptr="schemas-1" remap="internal">Chapter&nbsp;14, LDAP General Reference (Reference)</olink> for
an extended list of schemas used by the LDAP naming service.</para>
</sect2><sect2 id="sundssetup-11"><title>Using Browsing Indexes</title><para><indexterm><primary>browsing indices</primary></indexterm>The browsing
index functionality of the Sun Java System Directory Server, otherwise known as the virtual list
view (VLV), provides a way in which a client can view a select group or number
of entries from very long list, thus making the search process less time consuming
for each client. Browsing indexes provide optimized, predefined search parameters
with which the Solaris LDAP naming client can access specific information
from the various services more quickly. Keep in mind that if you do not create
browsing indexes, the clients may not get all the entries of a given type
because the server limits for search time or number of entries might be enforced.</para><para>VLV indexes are configured on the directory server and the proxy user
has read access to these indexes.</para><para>Before configuring browsing indexes on the Sun Java System Directory Server, consider the
performance cost associated with using these indexes. For more information,
refer to the <citetitle>Administration Guide</citetitle> for the version of Sun Java System Directory Server that
you are using.</para><para><command>idsconfig</command> creates entries for several VLV indexes.
Use the <command>directoryserver</command> script to stop the server and to
create the actual VLV indexes. See the <olink targetdoc="group-refman" targetptr="idsconfig-1m" remap="external"><citerefentry><refentrytitle>idsconfig</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> and the <olink targetdoc="group-refman" targetptr="directoryserver-1m" remap="external"><citerefentry><refentrytitle>directoryserver</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man pages for more information. Refer to the output
of the <command>idsconfig</command> command to determine the VLV entries created
by <command>idsconfig</command> and the syntax of the corresponding <command>directoryserver</command> commands that you need to run. See <olink targetptr="sundssetup-39" remap="internal">Example
idsconfig Setup</olink> for sample <command>idsconfig</command> output.</para>
</sect2>
</sect1><sect1 id="sundssetup-1"><title>Using Service Search Descriptors to Modify
Client Access to Various Services</title><para><indexterm><primary>service search descriptors</primary><secondary>definition</secondary></indexterm>A service search descriptor (SSD) changes the default
search request for a given operation in LDAP to a search you define.  SSDs
are particularly useful if, for example, you have been using LDAP with customized
container definitions or another operating system and are now transitional
to the latest Solaris release. Using SSDs, you can configure Solaris LDAP
naming services without having to change your existing LDAP database and data.</para><sect2 id="sundssetup-14"><title>Setting Up SSDs Using <literal>idsconfig</literal></title><para>Assume your predecessor at Example, Inc. had configured LDAP, storing
users in <literal>ou=Users</literal> container. You are now upgrading to the
latest Solaris release. By definition, Solaris LDAP client assumes that user
entries are stored in <literal>ou=People</literal> container. Thus, when it
comes to searching the <literal>passwd</literal> service, LDAP client will
search the <literal>ou=people</literal> level of the DIT and not find the
correct values.</para><para>One laborious solution to the above problem would be to completely overwrite
Example, Inc.'s existing DIT and to rewrite all the exiting applications on
Example, Inc.'s network so that they are compatible with the new LDAP naming
service. A second, far preferable solution would be to use an SSD that would
tell LDAP client to look for user info in an <literal>ou=Users</literal> container
instead the default <literal>ou=people</literal> container.</para><para>You would define the necessary SSD during the configuration of the Sun Java System Directory Server using <command>idsconfig</command>. The prompt line appears as follows.</para><screen>Do you wish to setup Service Search Descriptors (y/n/h? <userinput>y</userinput>
  A  Add a Service Search Descriptor
  D  Delete a SSD
  M  Modify a SSD
  P  Display all SSD's
  H  Help
  X  Clear all SSD's

  Q  Exit menu
Enter menu choice: [Quit] <userinput>a</userinput>
Enter the service id: <userinput>passwd</userinput>
Enter the base: service <userinput>ou=user,dc=west,dc=example,dc=com</userinput>
Enter the scope: <userinput>one</userinput>[default]
  A  Add a Service Search Descriptor
  D  Delete a SSD
  M  Modify a SSD
  P  Display all SSD's
  H  Help
  X  Clear all SSD's

  Q  Exit menu
Enter menu choice: [Quit] p

Current Service Search Descriptors:
==================================
Passwd:ou=Users,ou=west,ou=example,ou=com?

Hit return to continue.

  A  Add a Service Search Descriptor
  D  Delete a SSD
  M  Modify a SSD
  P  Display all SSD's
  H  Help
  X  Clear all SSD's

  Q  Exit menu
Enter menu choice: [Quit] q</screen>
</sect2>
</sect1><sect1 id="sundssetup-33"><title>Running <command>idsconfig</command></title><note><para>You do not need special rights to run <command>idsconfig</command>,
nor do you need to be an LDAP naming client. Remember to create a checklist
as mentioned in <olink targetptr="sundssetup-234" remap="internal">Creating a Checklist Based
on Your Server Installation</olink> in preparation for running <command>idsconfig</command>. You do not have to run <command>idsconfig</command> from a server
or an LDAP naming service client machine. You can run <command>idsconfig</command> from
any Solaris machine on the network.</para>
</note><caution><para><command>idsconfig</command> sends the Directory Manager's
password in the clear. If you do not want this to happen, you must run <command>idsconfig</command> on the directory server itself, not on a client.</para>
</caution><task id="sundssetup-proc-224"><title>How to Configure Sun Java System Directory Server Using <literal>idsconfig</literal></title><procedure><step id="sundssetup-step-15"><para>Make sure the target Sun Java System Directory Server is up
and running.</para>
</step><step id="sundssetup-step-226"><para>Run <command>idsconfig</command>.</para><screen># <userinput>/usr/lib/ldap/idsconfig</userinput></screen><para>Refer to <olink targetptr="sundssetup-ex-240" remap="internal">Example&nbsp;11&ndash;1</olink> for
an example run of <literal>idsconfig</literal> using the definitions listed
in the server and client checklists at the beginning of this chapter in <olink targetptr="sundssetup-234" remap="internal">Creating a Checklist Based on Your Server Installation</olink>.</para>
</step><step id="sundssetup-step-237"><para>Answer the questions when prompted.</para><para>Note that 'no' [n] is the default user input. If you need clarification
on any given question, type</para><screen><userinput>h</userinput></screen><para>and a brief help paragraph will appear.</para><para>After <command>idsconfig</command> has completed the setup of the directory, you need to run the specified
commands on the server before the server setup is complete and the server
is ready to serve clients.</para>
</step>
</procedure>
</task><sect2 id="sundssetup-39"><title>Example <command>idsconfig</command> Setup</title><para>This section provides an example of a simple <command>idsconfig</command> setup,
without modifying many of the defaults. The most complicated method of modifying
client profiles is by creating SSDs. Refer to <olink targetptr="sundssetup-1" remap="internal">Using
Service Search Descriptors to Modify Client Access to Various Services</olink> for
a detailed discussion.</para><para>A carriage return sign after the prompt means that you are accepting
the [default] by hitting <keysym>enter</keysym>.</para><note><para>Any parameters left blank in the summary screen will not be set
up.</para>
</note><para>After <command>idsconfig</command> has completed the setup of the directory,
you need to run the specified commands on the server before the server setup
is complete and the server is ready to serve clients.</para><example id="sundssetup-ex-240"><title>Running <command>idsconfig</command> for
the Example, Inc. Network</title><screen># <userinput>usr/lib/ldap/idsconfig</userinput>
It is strongly recommended that you BACKUP the directory server
before running idsconfig.

Hit Ctrl-C at any time before the final confirmation to exit.

Do you wish to continue with server setup (y/n/h)? [n] <userinput>Y</userinput></screen><screen>Enter the directory server's hostname to setup: <userinput>myserver</userinput></screen><screen>Enter the Directory Server's port number (h=help): [389]
Enter the directory manager DN: [cn=Directory Manager] 
Enter passwd for cn=Directory Manager : 
Enter the domainname to be served (h=help): [west.example.com] 
Enter LDAP Base DN (h=help): [dc=west,dc=example,dc=com] 
Enter the profile name (h=help): [default] WestUserProfile
Default server list (h=help): [192.168.0.1] 
Preferred server list (h=help): 
Choose desired search scope (one, sub, h=help):  [one] 
The following are the supported credential levels:
  1  anonymous
  2  proxy
  3  proxy-anonymous
  4  self
  5  self proxy
  6  self proxy anonymous
Choose Credential level [h=help]: [1] <userinput>2</userinput></screen><screen>The following are the supported Authentication Methods:
  1  none
  2  simple
  3  sasl/DIGEST-MD5
  4  tls:simple
  5  tls:sasl/DIGEST-MD5
  6  sasl/GSSAPI
Choose Authentication Method (h=help): [1] <userinput>2</userinput></screen><screen>Current authenticationMethod: simple

Do you want to add another Authentication Method? <userinput>N</userinput></screen><screen>Do you want the clients to follow referrals (y/n/h)? [n] <userinput>N</userinput></screen><screen>Do you want to modify the server timelimit value (y/n/h)? [n] <userinput>Y</userinput></screen><screen>Enter the server time limit (current=3600): [-1]</screen><screen>Do you want to modify the server sizelimit value (y/n/h)? [n] <userinput>Y</userinput></screen><screen>Enter the server size limit (current=2000): [-1]</screen><screen>Do you want to store passwords in "crypt" format (y/n/h)? [n] <userinput>Y</userinput></screen><screen>Do you want to setup a Service Authentication Methods (y/n/h)? [n]
Client search time limit in seconds (h=help): [30] 
Profile Time To Live in seconds (h=help): [43200] </screen><screen>Bind time limit in seconds (h=help): [10]</screen><screen>Do you wish to setup Service Search Descriptors (y/n/h)? [n] 
 
              Summary of Configuration

  1  Domain to serve               : west.example.com
  2  Base DN to setup              : dc=west,dc=example,dc=com
  3  Profile name to create        : WestUserProfile
  4  Default Server List           : 192.168.0.1
  5  Preferred Server List         : 
  6  Default Search Scope          : one
  7  Credential Level              : proxy
  8  Authentication Method         : simple
  9  Enable Follow Referrals       : FALSE
 10  Server Time Limit             : -1
 11  Server Size Limit             : -1
 12  Enable crypt password storage : TRUE
 13  Service Auth Method pam_ldap  : 
 14  Service Auth Method keyserv   : 
 15  Service Auth Method passwd-cmd: 
 16  Search Time Limit             : 30
 17  Profile Time to Live          : 43200
 18  Bind Limit                    : 10
 19  Service Search Descriptors Menu

Enter config value to change: (1-19 0=commit changes) [0] 
Enter DN for proxy agent:[cn=proxyagent,ou=profile,dc=west,dc=example,dc=com]
Enter passwd for proxyagent: 
Re-enter passwd: 
 </screen><screen>WARNING: About to start committing changes. (y=continue, n=EXIT) <userinput>Y</userinput></screen><screen>1. Changed timelimit to -1 in cn=config.
2. Changed sizelimit to -1 in cn=config.
3. Changed passwordstoragescheme to "crypt" in cn=config.
4. Schema attributes have been updated.
5. Schema objectclass definitions have been added.
6. Created DN component dc=west.
7. NisDomainObject added to dc=west,dc=example,dc=com.
8. Top level "ou" containers complete.
9. automount maps: auto_home auto_direct auto_master auto_shared processed.
10. ACI for dc=west,dc=example,dc=com modified to disable self modify.
11. Add of VLV Access Control Information (ACI).
12. Proxy Agent cn=proxyagent,ou=profile,dc=west,dc=example,dc=com added.
13. Give cn=proxyagent,ou=profile,dc=west,dc=example,dc=com read permission for 
password.
14. Generated client profile and loaded on server.
15. Processing eq,pres indexes:
      uidNumber (eq,pres)   Finished indexing.
      ipNetworkNumber (eq,pres)   Finished indexing.
      gidnumber (eq,pres)   Finished indexing.
      oncrpcnumber (eq,pres)   Finished indexing.
      automountKey (eq,pres)   Finished indexing.
16. Processing eq,pres,sub indexes:
      ipHostNumber (eq,pres,sub)   Finished indexing.
      membernisnetgroup (eq,pres,sub)   Finished indexing.
      nisnetgrouptriple (eq,pres,sub)   Finished indexing.
17. Processing VLV indexes:
      west.example.com.getgrent vlv_index     Entry created
      west.example.com.gethostent vlv_index   Entry created
      west.example.com.getnetent vlv_index    Entry created
      west.example.com.getpwent vlv_index     Entry created
      west.example.com.getrpcent vlv_index    Entry created
      west.example.com.getspent vlv_index     Entry created
      west.example.com.getauhoent vlv_index   Entry created
      west.example.com.getsoluent vlv_index   Entry created
      west.example.com.getauduent vlv_index   Entry created
      west.example.com.getauthent vlv_index   Entry created
      west.example.com.getexecent vlv_index   Entry created
      west.example.com.getprofent vlv_index   Entry created
      west.example.com.getmailent vlv_index   Entry created
      west.example.com.getbootent vlv_index   Entry created
      west.example.com.getethent vlv_index    Entry created
      west.example.com.getngrpent vlv_index   Entry created
      west.example.com.getipnent vlv_index    Entry created
      west.example.com.getmaskent vlv_index   Entry created
      west.example.com.getprent vlv_index     Entry created
      west.example.com.getip4ent vlv_index    Entry created
      west.example.com.getip6ent vlv_index    Entry created

idsconfig: Setup of myserver is complete.

Note: idsconfig has created entries for VLV indexes.  Use the
      directoryserver(1m) script on myserver to stop
      the server and then enter the following vlvindex
      sub-commands to create the actual VLV indexes:

  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getgrent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.gethostent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getnetent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getpwent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getrpcent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getspent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getauhoent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getsoluent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getauduent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getauthent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getexecent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getprofent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getmailent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getbootent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getethent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getngrpent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getipnent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getmaskent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getprent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getip4ent
  directoryserver -s myserver vlvindex -n userRoot -T west.example.com.getip6ent</screen>
</example>
</sect2>
</sect1><sect1 id="sundssetup-70"><title>Populating the Directory Server Using <command>ldapaddent</command></title><indexterm><primary>Sun Java System server setup</primary><secondary>load data into directory server</secondary>
</indexterm><note><para><indexterm><primary>ldapaddent</primary></indexterm>Before populating
the directory server with data, you must configure the server to store passwords
in UNIX <literal>Crypt</literal> format if you are using <literal>pam_unix</literal>.
If you are using <literal>pam_ldap</literal>, you can store passwords in any
format. For more information about setting the password in UNIX <literal>crypt</literal> format,
see the Sun Java System Directory Server documents.</para>
</note><para><command>ldapaddent</command> reads from the standard input (that being
an <literal>/etc/filename</literal> like <filename>passwd</filename>) and
places this data to the container associated with the service. Client configuration
determines how the data will be written by default.</para><note><para><olink targetdoc="group-refman" targetptr="ldapaddent-1m" remap="external"><citerefentry><refentrytitle>ldapaddent</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> can only run on an LDAP client. <olink targetptr="clientsetup-1" remap="internal">Chapter&nbsp;12, Setting Up LDAP Clients (Tasks)</olink> describes
how to configure a client for the LDAP naming service.</para>
</note><task id="sundssetup-proc-37"><title>How to Populate Sun Java System Directory Server With User
Password Data Using <command>ldapaddent</command></title><tasksummary><para>See <olink targetdoc="group-refman" targetptr="ldapaddent-1m" remap="external"><citerefentry><refentrytitle>ldapaddent</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>. See <olink targetptr="ldapsecure-1" remap="internal">Chapter&nbsp;9,
LDAP Basic Components and Concepts (Overview)</olink> for information about
LDAP security and write-access to the directory server.</para>
</tasksummary><procedure remap="single-step"><step><para>Use the <command>ldapaddent</command> command to add <filename>/etc/passwd</filename> entries to the server.</para><screen># <userinput>ldapaddent</userinput> <option>D</option> <userinput>"cn=directory manager"</userinput> <option>f</option> <userinput>/etc/passwd passwd</userinput></screen>
</step>
</procedure>
</task>
</sect1><sect1 id="sundssetup-27"><title>Managing Printer Entries</title><sect2 id="sundssetup-30"><title>Adding Printers</title><para>To add printer entries to the LDAP directory, use either the <literal>printmgr</literal> configuration tool or the <command>lpset <option>n</option> ldap</command> command-line
utility. See <olink targetdoc="group-refman" targetptr="lpset-1m" remap="external"><citerefentry><refentrytitle>lpset</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>.
Note that the printer objects added to the directory only define the connection
parameter, required by print system clients, of printers. Local print server
configuration data is still held in files. A typical printer entry would look
like the following:</para><screen>printer-uri=myprinter,ou=printers,dc=mkg,dc=example,dc=com
objectclass=top
objectclass=printerService
objectclass=printerAbstract
objectclass=sunPrinter
printer-name=myprinter
sun-printer-bsdaddr=printsvr.example.com,myprinter,Solaris
sun-printer-kvp=description=HP LaserJet (PS)
printer-uri=myprinter</screen>
</sect2><sect2 id="sundssetup-29"><title>Using <command>lpget</command></title><para><olink targetdoc="group-refman" targetptr="lpget-1m" remap="external"><citerefentry><refentrytitle>lpget</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> can
be used to list all printer entries known by the LDAP client's LDAP directory.
If the LDAP client's LDAP server is a replica server, then printers listed
might not be the same as that in the master LDAP server depending on the update
replication agreement. See <olink targetdoc="group-refman" targetptr="lpget-1m" remap="external"><citerefentry><refentrytitle>lpget</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> for
more information.</para><para>For example, to list all printers for a given base DN, type the following:</para><screen># <userinput>lpget</userinput> <option>n</option> <userinput>ldap list</userinput>
myprinter:
	dn=myprinter,ou=printers,dc=mkt,dc=example,dc=com
	bsdaddr=printsvr.example.com,myprinter,Solaris
	description=HP LaserJet (PS)</screen>
</sect2>
</sect1><sect1 id="sundssetup-26"><title>Populating the Directory Server With Additional
Profiles</title><para>Use <command>ldapclient</command> with the <literal>genprofile</literal> option
to create an LDIF representation of a configuration profile, based on the
attributes specified. The profile you create can then be loaded into an LDAP
server to be used as the client profile. The client profile can be downloaded
by the client by using <command>ldapclient init</command>.</para><para>Refer to <olink targetdoc="group-refman" targetptr="ldapclient-1m" remap="external"><citerefentry><refentrytitle>ldapclient</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> for information about using <command>ldapclient genprofile</command>.</para><task id="sundssetup-proc-34"><title>How to Populate the Directory Server
With Additional Profiles Using <command>ldapclient</command></title><procedure><step><para>Become superuser or assume an equivalent role.</para><para>Roles
contain authorizations and privileged commands. For more information about
roles, see <olink targetdoc="sysadv6" targetptr="rbactask-1" remap="external">Chapter 9, <citetitle remap="chapter">Using Role-Based Access Control (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.</para>
</step><step id="sundssetup-step-35"><para>Use <command>ldapclient</command> with
the <command>genprofile</command> command.</para><screen># <userinput>ldapclient genprofile \</userinput>
<userinput></userinput><option>a</option> <userinput>profileName=myprofile \</userinput>
<userinput></userinput><option>a</option> <userinput>defaultSearchBase=dc=west,dc=example,dc=com \</userinput>
<userinput></userinput><option>a</option> <userinput>"defaultServerList=192.168.0.1 192.168.0.2:386" \</userinput></screen><para><userinput>&gt; myprofile.ldif</userinput></para>
</step><step id="sundssetup-step-36"><para>Upload the new profile to the server.</para><screen># <userinput>ldapadd</userinput> <option>h</option> <userinput>192.168.0.1</userinput> <option>D</option> <userinput>&ldquo;cn=directory manager&rdquo;</userinput> <option>f</option> <userinput>myprofile.ldif</userinput></screen>
</step>
</procedure>
</task>
</sect1><sect1 id="sundssetup-31"><title>Configuring the Directory Server to Enable
Account Management</title><para>In order for <literal>pam_ldap</literal> to work properly, the password
and account lockout policy must be properly configured on the server. You
can use the Directory Server Console or <command>ldapmodify</command> to configure
the account management policy for the LDAP directory. For procedures and more
information, see the &ldquo;User Account Management&rdquo; chapter in the <citetitle>Administration Guide</citetitle> for the version of Sun Java System Directory Server that you are
using.</para>&pamldapnote;<para>Passwords for <literal>proxy</literal> users should <emphasis>never</emphasis> be
allowed to expire.  If proxy passwords expire, clients using the <literal>proxy</literal> credential
level  cannot retrieve naming service information from the server. To ensure
that proxy users have passwords that do not expire, modify the proxy accounts
with the following script.</para><screen># <userinput>ldapmodify</userinput> <option>h</option> <userinput><replaceable>ldapserver</replaceable></userinput> <option>D</option> <userinput><replaceable>administrator DN</replaceable> \</userinput>
<userinput></userinput><option>w</option> <userinput><replaceable>administrator password</replaceable> &lt;&lt;EOF</userinput>
<userinput>dn: <replaceable>proxy user DN</replaceable></userinput>
<userinput>DNchangetype: modify</userinput>
<userinput>replace: passwordexpirationtime</userinput>
<userinput>passwordexpirationtime: 20380119031407Z</userinput>
<userinput>EOF</userinput></screen><note><para><literal>pam_ldap</literal> account management relies on Sun Java System Directory Server to
maintain and provide password aging and account expiration information for
users. The directory server does not interpret the corresponding data from
shadow entries to validate user accounts. <literal>pam_unix</literal>, however,
examines the shadow data to determine if accounts are locked or if passwords
are aged. Since the shadow data is not kept up to date by the LDAP naming
services or the directory server, <literal>pam_unix</literal> should not grant
access based on the shadow data. The shadow data is retrieved using the <literal>proxy</literal> identity.  Therefore, do not allow <literal>proxy</literal> users
to have read access to the <literal>userPassword</literal> attribute. Denying <literal>proxy</literal> users read access to <literal>userPassword</literal> prevents <literal>pam_unix</literal> from making an invalid account validation.</para>
</note>
</sect1><sect1 id="sundssetup-40"><title>Migrating Your Sun Java System Directory Server</title><indexterm><primary>migration</primary><secondary>directory server</secondary>
</indexterm><indexterm><primary>Sun Java System Directory Server</primary><secondary>migration</secondary>
</indexterm><indexterm><primary>directory server</primary><secondary>migration</secondary>
</indexterm><para>Schema changes were implemented between the release of Sun Java System Directory Server 5.1
(formerly Sun ONE Directory Server) and the release of Sun Java System Directory Server 5.2. The <command>ldapaddent</command> command now adds <literal>objectclass: device</literal> to
the entries of <literal>ethers/bootparams</literal>. Therefore, if you choose
to use the LDAP commands to migrate directory data from Sun Java System Directory Server 5.1 to
5.2, you must use <command>ldapaddent</command> <option>d</option> to export
data and <command>ldapaddent</command> to import data. Otherwise, if you use
the Sun Java System Directory Server tools <filename>db2ldif</filename> and <filename>ldif2db</filename> to
migrate data, you must apply Sun Java System Directory Server 5.2 with all patches before migrating
the data, or the data import could fail.</para><para>For information about configuring the Sun Java System Directory Server 5.2, see the Sun Java System Directory Server documentation,
that is included with the Sun Java Enterprise System.</para>
</sect1>
</chapter><?Pub *0000036863 0?>