I'm not sure if it's a usage issue, or if it's a command pdbedit bug. Run the pdbedit command to add a password length restriction policy. The pdbedit command is not restricted by the policy when adding users. Hope can help me. Create a test10 user: adduser test10 Run the following command to limit the length of the password: pdbedit -P "min password length" -C 16 Use the following command to add users, but are not restricted by the above command: pdbedit -a -u test10 pdbedit -P "min password length" (The default length limit is 5.) When you enter a password, you can add users even if you enter a single digit. It is not restricted by the account password policy, I have verified it in many versions, and it is the same situation. Looking forward to hearing from you。
there are no checks about password length when add users by pdbedit. i think we can add check at new_user(), and i push a patch(add-password-length-check-for-pdbedit.patch) about this.
Created attachment 18285 [details] add check for password length when adding users by pdbedit