HP CIFS Server Administrator's Guide (5900-1282, April 2011)

file. If the password of ldap admin dn ever changes, the password will
need to be manually updated as well. The password is entered in the
command line.
-W Changes the LDAP directory manager password. With the -W option, the
user is prompted for the password. The password is entered using stdin
and thus the clear text password never appears on the command line.
-x This option specifies that the [username] following should be deleted from
the configured passdb backend.
username Specifies the user name for all of the root only options to operate on. Only
root can specify this parameter, as only root has the permissions needed
to modify attributes directly in the SMB password database.
Examples
Run the following command to create a Samba account for the user cifsuser1:
$ smbpasswd -a cifsuser1
Run the following command to delete a Samba account for the user cifsuser2:
$ smbpasswd -x cifsuser2
Run the following command to change the LDAP directory manager password:
$ smbpasswd -w <password of the LDAP Directory Manager>
For example, the following command changes the credentials of the LDAP directory manager:
$ smbpasswd -w dmpasswd
or you can run the smbpasswd -W command to change the LDAP directory manager password
as follows:
$ smbpasswd -W
With the -W option, the user is prompted for the password. The password is entered using stdin.
Syncsmbpasswd
You can use the syncsmbpasswd tool is to synchronize the CIFS Server Samba user list with the
UNIX or POSIX user list regardless of user database or CIFS authentication backend. When
executed, syncsmbpasswd will add (without password) Samba user entries not already present
corresponding to UNIX or POSIX user entries (based on listusers(1)). See the syncsmbpasswd
(1) man page for details.
If you set the passdb backend parameter in smb.conf to ldapsam:ldap://<ldap server
name>, this tool adds Samba user entries that correspond to the existing POSIX user accounts to
the LDAP directory server.
Options
None.
There are no options for this command.
Example
For example, use the following procedures to synchronize Samba user accounts with available
POSIX user accounts in /etc/passwd to the smbpasswd file:
1. Configure the passdb backend parameter in smb.conf:
$ passdb backend = smbpasswd
2. Run the following command:
$ syncsmbpasswd
158 Tool Reference