mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
pdbedit should not call idmap anymore. Otherwise pdbedit -L would
allocate id's. Volker
This commit is contained in:
parent
2f7658d9ba
commit
0358cc7675
@ -419,7 +419,7 @@ SMBPASSWD_OBJ = utils/smbpasswd.o $(PARAM_OBJ) $(SECRETS_OBJ) \
|
|||||||
|
|
||||||
PDBEDIT_OBJ = utils/pdbedit.o $(PARAM_OBJ) $(PASSDB_OBJ) $(LIBSAMBA_OBJ) \
|
PDBEDIT_OBJ = utils/pdbedit.o $(PARAM_OBJ) $(PASSDB_OBJ) $(LIBSAMBA_OBJ) \
|
||||||
$(UBIQX_OBJ) $(LIB_OBJ) $(GROUPDB_OBJ) $(SECRETS_OBJ) \
|
$(UBIQX_OBJ) $(LIB_OBJ) $(GROUPDB_OBJ) $(SECRETS_OBJ) \
|
||||||
$(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(IDMAP_OBJ)
|
$(POPT_LIB_OBJ) $(SMBLDAP_OBJ)
|
||||||
|
|
||||||
RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
|
RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
|
||||||
rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \
|
rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \
|
||||||
|
@ -172,8 +172,7 @@ static int print_sam_info (SAM_ACCOUNT *sam_pwent, BOOL verbosity, BOOL smbpwdst
|
|||||||
char lm_passwd[33];
|
char lm_passwd[33];
|
||||||
char nt_passwd[33];
|
char nt_passwd[33];
|
||||||
|
|
||||||
uid = -1;
|
uid = nametouid(pdb_get_username(sam_pwent));
|
||||||
idmap_sid_to_uid(pdb_get_user_sid(sam_pwent), &uid, 0);
|
|
||||||
pdb_sethexpwd(lm_passwd, pdb_get_lanman_passwd(sam_pwent), pdb_get_acct_ctrl(sam_pwent));
|
pdb_sethexpwd(lm_passwd, pdb_get_lanman_passwd(sam_pwent), pdb_get_acct_ctrl(sam_pwent));
|
||||||
pdb_sethexpwd(nt_passwd, pdb_get_nt_passwd(sam_pwent), pdb_get_acct_ctrl(sam_pwent));
|
pdb_sethexpwd(nt_passwd, pdb_get_nt_passwd(sam_pwent), pdb_get_acct_ctrl(sam_pwent));
|
||||||
|
|
||||||
@ -185,8 +184,7 @@ static int print_sam_info (SAM_ACCOUNT *sam_pwent, BOOL verbosity, BOOL smbpwdst
|
|||||||
pdb_encode_acct_ctrl(pdb_get_acct_ctrl(sam_pwent),NEW_PW_FORMAT_SPACE_PADDED_LEN),
|
pdb_encode_acct_ctrl(pdb_get_acct_ctrl(sam_pwent),NEW_PW_FORMAT_SPACE_PADDED_LEN),
|
||||||
(uint32)pdb_get_pass_last_set_time(sam_pwent));
|
(uint32)pdb_get_pass_last_set_time(sam_pwent));
|
||||||
} else {
|
} else {
|
||||||
uid = -1;
|
uid = nametouid(pdb_get_username(sam_pwent));
|
||||||
idmap_sid_to_uid(pdb_get_user_sid(sam_pwent), &uid, 0);
|
|
||||||
printf ("%s:%d:%s\n", pdb_get_username(sam_pwent), uid, pdb_get_fullname(sam_pwent));
|
printf ("%s:%d:%s\n", pdb_get_username(sam_pwent), uid, pdb_get_fullname(sam_pwent));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -621,21 +619,12 @@ int main (int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialise the password backed before idmap and the global_sam_sid
|
|
||||||
to ensure that we fetch from ldap before we make a domain sid up */
|
|
||||||
|
|
||||||
if(!initialize_password_db(False))
|
if(!initialize_password_db(False))
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
if (!init_names())
|
if (!init_names())
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
if (!idmap_init(lp_idmap_backend()))
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
if (!idmap_init_wellknown_sids())
|
|
||||||
exit(1);
|
|
||||||
|
|
||||||
setparms = (backend ? BIT_BACKEND : 0) +
|
setparms = (backend ? BIT_BACKEND : 0) +
|
||||||
(verbose ? BIT_VERBOSE : 0) +
|
(verbose ? BIT_VERBOSE : 0) +
|
||||||
(spstyle ? BIT_SPSTYLE : 0) +
|
(spstyle ? BIT_SPSTYLE : 0) +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user