PDBEDIT(8) System Administration tools PDBEDIT(8) (NAME) pdbedit - SAM ( Samba) (SYNOPSIS) pdbedit [-L|--list] [-v|--verbose] [-w|--smbpasswd-style] [-u|--user=USER] [-N|--account-desc=STRING] [-f|--fullname=STRING] [-h|--homedir=STRING] [-D|--drive=STRING] [-S|--script=STRING] [-p|--profile=STRING] [-I|--domain=STRING] [-U|--user SID=STRING] [-M|--machine SID=STRING] [-a|--create] [-r|--modify] [-m|--machine] [-x|--delete] [-b|--backend=STRING] [-i|--import=STRING] [-e|--export=STRING] [-g|--group] [-y|--policies] [--policies-reset] [-P|--account-policy=STRING] [-C|--value=LONG] [-c|--account-control=STRING] [--force-initialized-passwords] [-z|--bad-password-count-reset] [-Z|--logon-hours-reset] [--time-format=STRING] [-t|--password-from-stdin] [-K|--kickoff-time=STRING] [--set-nt-hash=STRING] [-?|--help] [--usage] [-d|--debuglevel=DEBUGLEVEL] [--debug-stdout] [--configfile=CONFIGFILE] [--option=name=value] [-l|--log-basename=LOGFILEBASE] [--leak-report] [--leak-report-full] (DESCRIPTION) samba(7) . pdbedit SAM (root) . pdbedit passdb ( smbpasswd ldap nis+ tdb ). pdbedit : . (OPTIONS) -L|--list . user/uid ':' . : pdbedit -L sorce:500:Simo Sorce samba:45:Test User -v|--verbose (verbose) . pdbedit . -w (hashes) . : pdbedit -L -v --------------- username: sorce user ID/Group: 500/500 user RID/GRID: 2000/2001 Full Name: Simo Sorce Home Directory: \\BERSERKER\sorce HomeDir Drive: H: Logon Script: \\BERSERKER\netlogon\sorce.bat Profile Path: \\BERSERKER\profile --------------- username: samba user ID/Group: 45/45 user RID/GRID: 1090/1091 Full Name: Test User Home Directory: \\BERSERKER\samba HomeDir Drive: Logon Script: Profile Path: \\BERSERKER\profile -w|--smbpasswd-style "smbpasswd" . pdbedit smbpasswd . ( smbpasswd(5) ). (-v) . : pdbedit -L -w sorce:500:508818B733CE64BEAAD3B435B51404EE: D2A2418EFC466A8A0F6B1DBB5C3DB80C: [UX ]:LCT-00000000: samba:45:0F2B255F7B67A7A9AAD3B435B51404EE: BC281CE3F53B6A5146629CD4751D3490: [UX ]:LCT-3BFA1E8D: -u|--user username ( ) . . -f|--fullname fullname . . : -f "Simo Sorce" -h|--homedir homedir . . : -h "\\\\BERSERKER\\sorce" -D|--drive drive . . : -D "H:" -S|--script script . (logon script) . : -S "\\\\BERSERKER\\netlogon\\sorce.bat" --set-nt-hash . nt-hash . . : --set-nt-hash 8846F7EAEE8FB117AD06BDD830B7586C -p|--profile profile . (profile) . : -p "\\\\BERSERKER\\netlogon" -M|'--machine SID' SID|rid . SID ( Security Identifier) rid . : -M S-1-5-21-2447931902-1787058256-3961074038-1201 -U|'--user SID' SID|rid . SID ( Security Identifier) rid . : -U S-1-5-21-2447931902-1787058256-3961074038-5004 : '--user SID' S-1-5-21-2447931902-1787058256-3961074038-5004 : -U 5004 : '--user SID' 5004 -c|--account-control account-control . (account control) . . o N: o D: o H: o T: o U: o M: MNS o W: o S: o L: o X: o I: : -c "[X ]" -K|--kickoff-time (kickoff time) . "never" . : pdbedit -K never user -a|--create . -u . pdbedit . : pdbedit -a -u sorce new password: retype new password unix password sync pdbedit . Samba . -a smbpasswd . -t|--password-from-stdin pdbedit /dev/tty ( passwd(1)) . . -r|--modify . -u . . . -m|--machine -a . pdbedit (-u username ). : pdbedit -a -m -u w2k-wks -x|--delete pdbedit . -u . : pdbedit -x -u bob -i|--import passdb-backend (backend) passdb smb.conf. . passdb . : pdbedit -i smbpasswd:/etc/smbpasswd.old -e|--export passdb-backend . passdb . : pdbedit -e smbpasswd:/root/samba-users.backup -g|--group -g -i in-backend -e out-backend (group mapping) . passdb . -b|--backend passdb-backend passdb. : pdbedit -b xml:/root/pdb-backup.xml -l -P|--account-policy account-policy (account policy) : minimum password age reset count minutes disconnect time user must logon to change password password history lockout duration min password length maximum password age bad lockout attempt. : pdbedit -P "bad lockout attempt" account policy value for bad lockout attempt is 0 -C|--value account-policy-value . -P . : pdbedit -P "bad lockout attempt" -C 3 account policy value for bad lockout attempt was 0 account policy value for bad lockout attempt is now 3 -y|--policies -y -i in-backend -e out-backend . tdb passdb LDAP . : pdbedit -y -i tdbsam: -e ldapsam:ldap://my.ldap.host --force-initialized-passwords . -N|--account-desc description . . : -N "test description" -Z|--logon-hours-reset . . . : -Z -z|--bad-password-count-reset . . : -z --policies-reset . : --policies-reset -I|--domain . . : -I "MYDOMAIN" --time-format . -?|--help . --usage . -d|--debuglevel=level level 0 10 . 1 . (log) . 0 . 1 - . 1 . 3 . log level /etc/samba/smb.conf . --debug-stdout STDOUT . STDERR . --configfile= . client smb encrypt . /etc/samba/smb.conf . . --option== "" smb.conf(5) "" . . --option=name=value . -l|--log-basename=logdirectory /. ".progname" ( log.smbclient log.smbd ). . --leak-report talloc . --leak-report-full talloc . -V|--version . (NOTES) (root) . (VERSION) 4.24.6 Samba . (SEE ALSO) smbpasswd(5), samba(7) (AUTHORS) Samba Andrew Tridgell . Samba Samba . pdbedit Simo Sorce Jelmer Vernooij . Samba 4.24.6 08/16/2026 PDBEDIT(8)