Match Samba 2.2, and make ACB_NORMAL the default ACB value.
[samba.git] / source3 / passdb / passdb.c
index cdbda389836d28efca2d65c2acf11143153be4a5..9d8f600eeac9a81703528a40ee5d72d22338977e 100644 (file)
@@ -104,6 +104,13 @@ void pdb_fill_default_sam(SAM_ACCOUNT *user)
 
        user->private.plaintext_pw = NULL;
 
+       /* 
+          Unless we know otherwise have a Account Control Bit
+          value of 'normal user'.  This helps User Manager, which
+          asks for a filtered list of users.
+       */
+
+       user->private.acct_ctrl = ACB_NORMAL;
 }      
 
 static void destroy_pdb_talloc(SAM_ACCOUNT **user) 
@@ -936,7 +943,7 @@ BOOL local_password_change(const char *user_name, int local_flags,
                if ((local_flags & LOCAL_ADD_USER) || (local_flags & LOCAL_DELETE_USER)) {
                        /* Might not exist in /etc/passwd.  Use rid algorithm here */
                        if (!NT_STATUS_IS_OK(pdb_init_sam_new(&sam_pass, user_name, 0))) {
-                               slprintf(err_str, err_str_len-1, "Failed initialise SAM_ACCOUNT for user %s.\n", user_name);
+                               slprintf(err_str, err_str_len-1, "Failed to initialise SAM_ACCOUNT for user %s.\n", user_name);
                                return False;
                        }
                } else {