HP CIFS Server 2.2i Administrator's Guide version A.01.11.01

LDAP Integration Support
Installing your Samba Users in the Directory
Chapter 6138
Before you run this script, you must edit the
/opt/samba/LDAP/import_smbpasswd.pl script to set the $DN,
$ROOTDN, $rootpw and $LDAPSERVER local site variables with the
LDAP base DN, your Directory Manager name, password and directory
server name.
Consider the following example which sets the LDAP base DN to
cup.hp.com”, the Directory Manager name to “Directory Manager”,
password to “dmpasswd”, and the LDAP directory server name to
“hostA.cup.hp.com”:
$DN=”dc=cup, dc=hp, dc=com”
$ROOTDN=”cn=Directory Manager”
$rootpw=”dmpasswd”
$LDAPSERVER=”hostA.cup.hp.com”
This script reads from standard input and requires that user entries
already exist in your LDAP directory containing the posixAccount
objectclass. Because it needs to know the uid number and uses it to add
the sambaAccount. For more information on this object and related
schema, see RPC2307 available at http://www.pad1.com/software.html.
For example, the following command will import all data in the
/var/opt/samba/private/smbpasswd file into the LDAP directory:
$ cat /var/opt/samba/private/smbpasswd | \
/opt/samba/LDAP/import_smbpasswd.pl
Verifying Samba Users
You can use the ldapsearch command-line utility to locate and retrieve
LDAP directory entries. This utility opens a connection to the specified
server using the specified Distinguished Name (DN) and password, and
locates entries based on the specified search filter.
Syntax
ldapsearch [
option
]
Option
-b search/insert base
-s search scope
-D directory login