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

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). The ldapmodify tool can be
used 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
smbpasswd [options] [username]
where options can be any of the following:
-L Runs in the local mode (must be first option).
-h Prints a list of options that the HP CIFS Server supports.
-s Uses stdin for password prompt. This option causes
smbpasswd to read passwords from standard input.
-c <config file> Specifies the path and file name of the smb.conf
configuration file when you want to use one other than the
default file.
-D <debug level > Specifies the debug level. The debug level is an integer from
0 to 10. If this parameter is not specified, the default value
is zero.
-r <remote machine name> Allows users to specify what machine they want to change
their password on. Without this parameter, smbpasswd
defaults to the local host. The remote machine name is the
NetBIOS name of the SMB/CIFS server to contact to attempt
the password change.
-U <username [%password]> Specifies the remote user name. This option may only be
used in conjunction with the -r option. When changing a
password on a remote machine, it allows the user to specify
the user name on that machine whose password will be
changed.
When you run smbpasswd as root, the following extra options are valid:
-a This option specifies that the [username] following should be added to the
configured passdb backend, with the new password typed in response to
the prompt (type <Enter> to keep the old password).
-d This option specifies that the account of the [username] following should
be disabled in the configured passdb backend.
-e This option specifies that the account of the [username] following should
be enabled if the account was previously disabled. If the account was not
disabled, this option has no effect.
-i This option tells smbpasswd that the account being changed is an
inter-domain trust account. Currently this is used when HP CIFS Server is
configured as a Primary Domain Controller. The account contains the info
about another trusted domain.
-n This option specifies that the username following should have their password
set to null (i.e. a blank password) in the configured passdb backend.
-m This option tells smbpasswd that the account being changed is a machine
account. Currently this is used when HP CIFS Server is configured as a
Primary Domain Controller.
-w < password> This option specifies the password to be used with the ldap admin dn.
The password is stored in the /var/opt/samba/private/secrets.tdb
file. If the password of ldap admin dn ever changes, the password will
160 Tool Reference