new system and a user is being added via pdbedit/smbpasswd.
Found at Connectathon setup.
Jeremy.
NTSTATUS nt_status;
char *password1, *password2, *staticpass;
+ get_global_sam_sid();
+
if (!NT_STATUS_IS_OK(nt_status = pdb_init_sam_new(&sam_pwent, username, 0))) {
DEBUG(0, ("could not create account to add new user %s\n", username));
return -1;
fstring machineaccount;
struct passwd *pwd = NULL;
+ get_global_sam_sid();
+
fstrcpy(machinename, machine_in);
machinename[15]= '\0';
int result = 0;
char *old_passwd = NULL;
- if (local_flags & LOCAL_SET_LDAP_ADMIN_PW)
- {
+ if (local_flags & LOCAL_SET_LDAP_ADMIN_PW) {
printf("Setting stored password for \"%s\" in secrets.tdb\n",
lp_ldap_admin_dn());
if (!store_ldap_admin_pw(ldap_secret))
goto done;
}
+ /* Ensure we have a SAM sid. */
+ get_global_sam_sid();
+
/*
* Ensure both add/delete user are not set
* Ensure add/delete user and either remote machine or join domain are