pdbedit
manages the Samba user database, allowing administrators to add
TLDR
List all Samba users with their settings
SYNOPSIS
pdbedit [options]
DESCRIPTION
pdbedit manages the Samba user database (SAM database), allowing administrators to add, modify, and delete Samba user accounts. It provides more detailed control than smbpasswd, including access to user flags, password policies, and database import/export.
Users must exist in the Unix system before being added to Samba. The tool can operate on different passdb backends including tdbsam (default) and ldapsam for LDAP integration.
PARAMETERS
-L, --list
List all Samba user accounts-v, --verbose
Enable verbose listing mode-u, --user username
Specify the user to operate on-a, --create
Add a new user account (prompts for password)-x, --delete
Delete specified user account-z, --bad-password-count-reset
Reset bad password count for user-t, --password-from-stdin
Read password from stdin-w, --smbpasswd-style
Use smbpasswd-style output-e, --export
Export user database to stdout-i, --import
Import user database from stdin-b, --backend name
Use specified passdb backend-P, --account-policy
Display or change account policy--policies-reset
Reset account policies to default
CAVEATS
Requires root privileges. User must exist in Unix passwd database before adding to Samba. For simple user management, smbpasswd may be easier. Backend configuration depends on smb.conf settings.
HISTORY
Part of the Samba suite since Samba 3.0, replacing older password database tools. Provides a unified interface for managing various Samba passdb backends as Samba moved away from the legacy smbpasswd file format.
