+
+ /*
+ * If we are trying to enable a user, first we need to find out
+ * if they are using a modern version of the smbpasswd file that
+ * disables a user by just writing a flag into the file. If so
+ * then we can re-enable a user without prompting for a new
+ * password. If not (ie. they have a no stored password in the
+ * smbpasswd file) then we need to prompt for a new password.
+ */
+
+ if(enable_user) {
+ struct smb_passwd *smb_pass = getsmbpwnam(user_name);
+ if((smb_pass != NULL) && (smb_pass->smb_passwd != NULL)) {
+ new_passwd = "XXXX"; /* Don't care. */
+ }
+ }
+
+ if(!new_passwd)
+ new_passwd = prompt_for_new_password(stdin_passwd_get);