Problem
When using the smbpasswd command the first time you add a Samba user to a new CIFS Server installation, the command may respond with a misleading message. See the following example:
./smbpasswd -a user1
New SMB password:
Retype new SMB password:
The misleading messages are displayed as follows:
startsmbfilepwent_internal: file /var/opt/samba/private/smbpasswd did not exist.
File successfully created.
account_policy_get: tdb_fetch_uint32 failed for field 1
(min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 2
(password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 3
(user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 4
(maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 5
(minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 6
(lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 7
(reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 8
(bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 9
(disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 10
(refuse machine password change), returning 0
Added user user1
The user will be added correctly and the misleading messages will only be displayed with the first occurrence of adding a new Samba user.
Workaround
Verify that the user has been added correctly and ignore the misleading messages.