if we run: # samba-tool user getpassword --attributes virtualCryptSHA256 it says: ERROR: Either the username or '--filter' must be specified! if we then run: # samba-tool user getpassword --filter="samaccountname=b*" --attributes virtualCryptSHA256 it says: ERROR: Failed to get password for user 'samaccountname=b*': Matched 8 multiple users with filter "samaccountname=b*" So the --filter option is almost useless as the command will only work if we match only one single user here.
I agree it is not very useful, but I think it is "working as advertised": --filter=FILTER LDAP Filter to get password for (must match single account) It looks like several other samba-tool user subcommands work similarly, but there --help is generally worse (disable, enable, readpasswords *, setexpiry, setpassword, unlock).