The -x option removes (deletes) a user account from the Samba password database, and the -a option adds a new account to the Samba password database, but if the specified account already exists, this -a flag has no special effect and the command simply proceeds to change that existing account's password. In contrast, -d disables an account (it does not delete it) and -e re-enables a previously disabled account (it does not exclude anything), per the smbpasswd(8) man page documentation.
Community Discussion