diff options
author | Jeremy Allison <jra@samba.org> | 2004-02-23 20:12:15 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2004-02-23 20:12:15 +0000 |
commit | fab1291e284a40a9af95228e4a77be991cbf0fe0 (patch) | |
tree | e5f9c3b948e13730a9ef218f9e5a222edf16e837 /source3/utils/smbpasswd.c | |
parent | 74112e7ccaff59bca963d07af3aa11520d5cb656 (diff) | |
download | samba-fab1291e284a40a9af95228e4a77be991cbf0fe0.tar.gz samba-fab1291e284a40a9af95228e4a77be991cbf0fe0.tar.bz2 samba-fab1291e284a40a9af95228e4a77be991cbf0fe0.zip |
Fix "unable to initialize" bug when smbd hasn't been run with
new system and a user is being added via pdbedit/smbpasswd.
Found at Connectathon setup.
Jeremy.
(This used to be commit 93580927dc255f205283b64c72fb95be990d2216)
Diffstat (limited to 'source3/utils/smbpasswd.c')
-rw-r--r-- | source3/utils/smbpasswd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c index 6854842b20..ea8bf7a472 100644 --- a/source3/utils/smbpasswd.c +++ b/source3/utils/smbpasswd.c @@ -340,8 +340,7 @@ static int process_root(int local_flags) 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)) @@ -349,6 +348,9 @@ static int process_root(int local_flags) 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 |