Manage accounts in Samba's passdb using pdbedit
Jorge Schrauwen <sjorge@blackdot.be>
new
posix
New in version 2017.7.0.
Create user account
login name
password
set if password is a nt hash instead of plain text
set to create a machine trust account instead
CLI Example:
salt '*' pdbedit.create zoe 9764951149F84E770889011E1DC4A927 nthash
salt '*' pdbedit.create river 1sw4ll0w3d4bug
Delete user account
login name
CLI Example:
salt '*' pdbedit.delete wash
Generate a NT HASH
CLI Example:
salt '*' pdbedit.generate_nt_hash my_passwd
Get user account details
login name
include NTHASH and LMHASH in verbose output
CLI Example:
salt '*' pdbedit.get kaylee
List user accounts
return all information
include NT HASH and LM HASH in verbose output
CLI Example:
salt '*' pdbedit.list
Modify user account
login name
password
set if password is a nt hash instead of plain text
users domain
profile path
logon script
home drive
home directory
full name
account description
specify the machines new primary group SID or rid
specify the users new primary group SID or rid
specify user account control properties
Note
Only the following can be set: - N: No password required - D: Account disabled - H: Home directory required - L: Automatic Locking - X: Password does not expire
reset the users allowed logon hours
reset the stored bad login counter
Note
if user is absent and password is provided, the user will be created
CLI Example:
salt '*' pdbedit.modify inara fullname='Inara Serra'
salt '*' pdbedit.modify simon password=r1v3r
salt '*' pdbedit.modify jane drive='V:' homedir='\\serenity\jane\profile'
salt '*' pdbedit.modify mal account_control=NX