s4-samba-tool: add password verification in add user
[samba.git] / source4 / scripting / python / samba / netcmd / user.py
index f44ebcaa69b541bde39f2bb40043355573d5af2f..b56d0398ce46d7f9da0721e2c340c20e26b5f019 100644 (file)
@@ -120,6 +120,10 @@ Example3 shows how to create a new user in the OrgUnit organizational unit.
             if password is not None and password is not '':
                 break
             password = getpass("New Password: ")
+            passwordverify = getpass("Retype Password: ")
+            if not password == passwordverify:
+                password = None
+                self.outf.write("Sorry, passwords do not match.\n")
 
         lp = sambaopts.get_loadparm()
         creds = credopts.get_credentials(lp)