HP CIFS Server 3.0k Administrator's Guide version A.02.04
2. Run the smbpasswd -a command to add the sambaSamAccount information for a user to
the LDAP directory server if the smb.conf parameter, passwd_backend, is set to ldapsam:
smbpasswd -a <user name>
For example, the following command creates the Samba account for the user, cifsuser1:
smbpasswd -a cifsuser1
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.
This section describes a portion of the available options for the ldapsearch command. See the
““LDAP Directory Management Tools” (page 202) section in chapter 14, “Tool Reference” for a
more complete description of this command.
Syntax
ldapsearch [option]
Option
-b
Specifies the starting point for the search. The value specified must be a distinguished name
that currently exits in the database.
-s
Specifies the scope of the search.
-D
Specifies the distinguished name (DN) with which to authenticate to the server. If specified,
this value must be a DN recognized by the Directory Server, and it must also have the
authority to search for the entries.
-w
Specifies the password of the directory manager
Example
The following example uses the ldapsearch utility to check that the user entry johnl contains
the sambaAccount objectclass:
$ /opt/ldapux/bin/ldapsearch -b "dc=org,dc=hp, dc=com" -s sub \
-D "cn=Directory Manager" -w dmpasswd "uid=johnl"
The output is shown as the follows:
dn: uid=johnl,ou=People,dc=org,dc=hp,dc=com
objectclass: top
objectclass: account
objectclass: posixAccount
objectclass: sambaAccount
loginShell: /usr/bin/ksh
uidNumber: 8662
gidNumber: 8200
homeDirectory: /home/johnl
gecos: John Louie, 48S-020, 447-1890
userPassword: {crypt}aOACGvt0T, 1fo
lmPassword: 0AED71B7494489AG2ED50F26D3C5EB07
NTPassword: 7C46DE22B8963EAA3F9F90BE4E0F661
acctFlags: UX
pwdLastSet: 1063301239
106 LDAP Integration Support