merges from 3.0
authorGerald Carter <jerry@samba.org>
Thu, 12 Feb 2004 17:12:06 +0000 (17:12 +0000)
committerGerald Carter <jerry@samba.org>
Thu, 12 Feb 2004 17:12:06 +0000 (17:12 +0000)
source/passdb/pdb_interface.c
source/utils/pdbedit.c

index 8c93aaae1eee58667473d63d10843f4d5cf34ab9..91f790711e7a856c6650573d568e35010b4f4d15 100644 (file)
@@ -824,7 +824,7 @@ BOOL pdb_add_sam_account(SAM_ACCOUNT *sam_acct)
           been allowed by the  ACB_PWNOTREQ bit */
 
        lm_pw = pdb_get_lanman_passwd( sam_acct );
-       nt_pw = pdb_get_lanman_passwd( sam_acct );
+       nt_pw = pdb_get_nt_passwd( sam_acct );
        acb_flags = pdb_get_acct_ctrl( sam_acct );
        if ( !lm_pw && !nt_pw && !(acb_flags&ACB_PWNOTREQ) ) {
                acb_flags |= ACB_DISABLED;
@@ -849,7 +849,7 @@ BOOL pdb_update_sam_account(SAM_ACCOUNT *sam_acct)
           been allowed by the  ACB_PWNOTREQ bit */
        
        lm_pw = pdb_get_lanman_passwd( sam_acct );
-       nt_pw = pdb_get_lanman_passwd( sam_acct );
+       nt_pw = pdb_get_nt_passwd( sam_acct );
        acb_flags = pdb_get_acct_ctrl( sam_acct );
        if ( !lm_pw && !nt_pw && !(acb_flags&ACB_PWNOTREQ) ) {
                acb_flags |= ACB_DISABLED;
index f402567b740db8cf2ec7e65d9d53839c1b84b7d1..83663c52b6c0407d89135ae086b1fe810be905d3 100644 (file)
@@ -251,13 +251,15 @@ static int fix_users_list (struct pdb_context *in)
        if (!(NT_STATUS_IS_OK(pdb_init_sam(&sam_pwent)))) return 1;
 
        while (check && (ret = NT_STATUS_IS_OK(in->pdb_getsampwent (in, sam_pwent)))) {
+               printf("Updating record for user %s\n", pdb_get_username(sam_pwent));
+       
                if (!pdb_update_sam_account(sam_pwent)) {
-                       DEBUG(0, ("Update of user %s failed!\n", pdb_get_username(sam_pwent)));
+                       printf("Update of user %s failed!\n", pdb_get_username(sam_pwent));
                }
                pdb_free_sam(&sam_pwent);
                check = NT_STATUS_IS_OK(pdb_init_sam(&sam_pwent));
                if (!check) {
-                       DEBUG(0, ("Failed to initialise new SAM_ACCOUNT structure (out of memory?)\n"));
+                       fprintf(stderr, "Failed to initialise new SAM_ACCOUNT structure (out of memory?)\n");
                }
                        
        }