summaryrefslogtreecommitdiff
path: root/source3/utils/smbpasswd.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-02-23 20:12:31 +0000
committerJeremy Allison <jra@samba.org>2004-02-23 20:12:31 +0000
commitaa4abfb3b589bf5123b5d0d674c3c26ebdabe1a0 (patch)
tree9d877b7c4cf309f40a24e1cb6c57e9bb59039b5b /source3/utils/smbpasswd.c
parent24df38dbc6648261f86adcffd664ffc43f8f3346 (diff)
downloadsamba-aa4abfb3b589bf5123b5d0d674c3c26ebdabe1a0.tar.gz
samba-aa4abfb3b589bf5123b5d0d674c3c26ebdabe1a0.tar.bz2
samba-aa4abfb3b589bf5123b5d0d674c3c26ebdabe1a0.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 f9c7a42e895f50e15d2f5079bfb2cb389fdf2df4)
Diffstat (limited to 'source3/utils/smbpasswd.c')
-rw-r--r--source3/utils/smbpasswd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index b43b29d0ad..2f68d02ef6 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -341,8 +341,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))
@@ -350,6 +349,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