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 | dfbe442c668480d88cb8b385c6b89f8e198ca500 (patch) | |
tree | f3071d2c1207c4a0feeb7f6a9e20ee53eeb2db9f /source | |
parent | ff002a458afa6ca378f0c6d2ec9fb74233c839a7 (diff) | |
download | samba-dfbe442c668480d88cb8b385c6b89f8e198ca500.tar.gz samba-dfbe442c668480d88cb8b385c6b89f8e198ca500.tar.xz samba-dfbe442c668480d88cb8b385c6b89f8e198ca500.zip |
make sure we store the domain sid when joining a ADS domain
Diffstat (limited to 'source')
-rw-r--r-- | source/utils/net_ads.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/utils/net_ads.c b/source/utils/net_ads.c index 0853cd3bbf9..7baa2972305 100644 --- a/source/utils/net_ads.c +++ b/source/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; |