HP CIFS Server Administrator's Guide Version A.03.01.02 (5900-1766, September 2011)

Pdbedit
You can use the pdbedit tool to manage the Samba user accounts stored in the SAM database
(database of Samba users). You must be logged in as the root user to run this tool.
The pdbedit tool can be used to perform the following operations:
Add, remove or modify user accounts.
List user accounts.
Migrate user accounts.
Migrate group accounts.
Manage account policies.
Manage domain access policy settings.
For detailed information on the pdbedit command, refer to the pdbedit man page, SWAT or
The Official Samba HOWTO and Reference Guide.
The pdbedit tool performs its operations on the data store specified by the passdb backend
parameter in the smb.conf file. If an LDAP directory is to be used, then the this parameter is set
to ldapsam:ldap://<LDAP server name>. If the Samba user account database file,
smbpasswd, is used, this parameter is set to smbpasswd.
If you manage user accounts in an LDAP directory server, an existing POSIX user must already
exists in the LDAP directory before you run the pdbedit -a command to add the corresponding
Samba user and its sambaSamAccount information required for HP CIFS Server user authentication.
If the POSIX user does not already exist in the LDAP directory server, you must first add the POSIX
user entry with the LDAP directory tools (such as ldapmodify). You can use the ldapmodify
tool to add, modify or delete a POSIX user in an LDAP directory server. For more information on
how to add POSIX user accounts to the LDAP Directory server, see the “Creating Samba Users in
the Directory” (page 94) section in the Chapter 6, “LDAP Integration Support”.
Syntax
pdbedit [options]
where options can be any of the following:
-L, list Lists all the user accounts in the users database. This option
displays a list of uid/user pairs information by the “:”
character.
-v, verbose Enables the verbose listing format. It causes pdbedit to list
the users in the database, display the account fields in a
descriptive format.
-w, smbpasswd-style This option enables pdbedit to list the users in the
database, display the account fields in the smbpasswd style
file format.
-u, user=username Specifies the user name to be used for the operation
requested (listing, adding, modifying and removing). It is
required for add, remove and modify operations and is
optional for list operations.
-N, account-desc=ARG Specifies a machine account description to be set.
-f, fullname=ARG Specifies the user's full name. This option can be used while
adding or modifying a user account.
-h, homedir=ARG Sets the user's home directory. This option can be used while
adding or modifying a user account.
162 Tool Reference