diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-12-20 23:35:53 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-12-20 23:35:53 +0000 |
commit | 91ee73e3009fdde79ce9e51ba0caac5669ed9279 (patch) | |
tree | 05e8d3fed010d88dedfcb3a4797ed417b5454679 | |
parent | 401c7495ea0286a46c97a18273419f122d1168a7 (diff) | |
download | samba-91ee73e3009fdde79ce9e51ba0caac5669ed9279.tar.gz samba-91ee73e3009fdde79ce9e51ba0caac5669ed9279.tar.bz2 samba-91ee73e3009fdde79ce9e51ba0caac5669ed9279.zip |
make sure we store the domain sid when joining a ADS domain
(This used to be commit dfbe442c668480d88cb8b385c6b89f8e198ca500)
-rw-r--r-- | source3/utils/net_ads.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 0853cd3bbf..7baa297230 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -210,6 +210,7 @@ static int net_ads_join(int argc, const char **argv) const char *org_unit = "Computers"; char *dn; void *res; + DOM_SID dom_sid; if (argc > 0) org_unit = argv[0]; @@ -251,6 +252,17 @@ static int net_ads_join(int argc, const char **argv) return -1; } + rc = ads_domain_sid(ads, &dom_sid); + if (!ADS_ERR_OK(rc)) { + d_printf("ads_domain_sid: %s\n", ads_errstr(rc)); + return -1; + } + + if (!secrets_store_domain_sid(lp_workgroup(), &dom_sid)) { + DEBUG(1,("Failed to save domain sid\n")); + return -1; + } + if (!secrets_store_machine_password(password)) { DEBUG(1,("Failed to save machine password\n")); return -1; |