diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-08-06 10:01:38 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-08-06 10:01:38 +0000 |
commit | db20fa5d4ea17b295c09a68f4210a62802704b32 (patch) | |
tree | 05456d4787a536e799c9114138d22e461aa8a015 /source3 | |
parent | 4361b5cea56972b534ba36d89b521f9ad240d3d7 (diff) | |
download | samba-db20fa5d4ea17b295c09a68f4210a62802704b32.tar.gz samba-db20fa5d4ea17b295c09a68f4210a62802704b32.tar.bz2 samba-db20fa5d4ea17b295c09a68f4210a62802704b32.zip |
fixed 'net ads chostpass' for new ads structures
(This used to be commit 3b0e60e522b669bad77e70d9c6f484a08ff84612)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net_ads.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 6916bcb406..ad405fe68c 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -880,7 +880,17 @@ static int net_ads_change_localhost_pass(int argc, const char **argv) char *hostname; ADS_STATUS ret; - if (!(ads = ads_init_simple())) return -1; + if (!secrets_init()) { + DEBUG(1,("Failed to initialise secrets database\n")); + return -1; + } + + asprintf(&opt_user_name, "%s$", global_myname); + opt_password = secrets_fetch_machine_password(); + + if (!(ads = ads_startup())) { + return -1; + } hostname = strdup(global_myname); strlower(hostname); |