Synopsispdbedit [-L] [-v] [-w] [-u username] [-f fullname ] [-h homedir] [-D drive] [-S script] [-p profile] [-a] [-m] [-r] [-x] [-i passdb-backend] [-e passdb-backend] [-b passdb-backend] [-g] [-d debuglevel] [-s configfile] [-P account-policy] [-C value] [-c account-control] DescriptionThis tool is part of the Samba(7) suite. The pdbedit program is used to manage the users accounts stored in the sam database and can only be run by root. The pdbedit tool uses the passdb modular interface and is independent from the kind of users database used (currently there are smbpasswd, ldap, nis+ and tdb based and more can be added without changing the tool). There are five main ways to use pdbedit: adding a user account, removing a user account, modifing a user account, listing user accounts, importing users accounts. Options-L ” This option lists all the user accounts present in the users database. This option prints a list of user/uid pairs separated by the ':' character.
-v ” This option enables the verbose listing format. It causes pdbedit to list the users in the database, printing out the account fields in a descriptive format.
-w ” This option sets the "smbpasswd" listing format. It will make pdbedit list the users in the database, printing out the account fields in a format compatible with the smbpasswd file format. (see the smbpasswd(5) for details)
-u username ” This option specifies the username to be used for the operation requested (listing, adding, removing). It is required in add, remove and modify operations and optional in list operations. -f fullname ” This option can be used while adding or modifing a user account. It will specify the user's full name.
-h homedir ” This option can be used while adding or modifing a user account. It will specify the user's home directory network path.
-D drive ” This option can be used while adding or modifing a user account. It will specify the windows drive letter to be used to map the home directory.
-S script ” This option can be used while adding or modifing a user account. It will specify the user's logon script path.
-p profile ” This option can be used while adding or modifing a user account. It will specify the user's profile directory.
-G SID rid ” This option can be used while adding or modifying a user account. It will specify the users' new primary group SID (Security Identifier) or rid.
-U SID rid ” This option can be used while adding or modifying a user account. It will specify the users' new SID (Security Identifier) or rid.
-c account-control ” This option can be used while adding or modifying a user account. It will specify the users' account control property. Possible flags that can be set are: N, D, H, L, X.
-a ” This option is used to add a user into the database. This command needs a user name specified with the -u switch. When adding a new user, pdbedit will also ask for the password to be used.
-r ” This option is used to modify an existing user in the database. This command needs a user name specified with the -u switch. Other options can be specified to modify the properties of the specified user. This flag is kept for backwards compatibility, but it is no longer necessary to specify it. -m ” This option may only be used in conjunction with the -a option. It will make pdbedit to add a machine trust account instead of a user account (-u username will provide the machine name).
-x ” This option causes pdbedit to delete an account from the database. It needs a username specified with the -u switch.
-i passdb-backend ” Use a different passdb backend to retrieve users than the one specified in smb.conf. Can be used to import data into your local user database.
-e passdb-backend ” Exports all currently available users to the specified password database backend.
-g ” If you specify -g , then -i in-backend -e out-backend applies to the group mapping instead of the user database.
-b passdb-backend ” Use a different default passdb backend.
-P account-policy ” Display an account policy
-C account-policy-value ” Sets an account policy to a specified value. This option may only be used in conjunction with the -P option.
-h “help ” Print a summary of command line options. -V ” Prints the program version number. -s <configuration file> ” The file specified contains the configuration details required by the server. The information in this file includes server-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide. See smb.conf for more information. The default configuration file name is determined at compile time. -d “debug=debuglevel ” debuglevel is an integer from 0 to 10. The default value if this parameter is not specified is zero.
-l “logfile=logbasename ” File name for log/debug files. The extension ".client" will be appended. The log file is never removed by the client. NotesThis command may be used only by root. See Alsosmbpasswd(5), samba(7) |