r15543: New implementation of 'net ads join' to be more like Windows XP.
authorGerald Carter <jerry@samba.org>
Fri, 12 May 2006 15:17:35 +0000 (15:17 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:16:57 +0000 (11:16 -0500)
commit2c029a8b96ae476f1d5c2abe14ee25f98a1513d8
treed256cef6a5f4802549a599477c6bc8b4897d4ff0
parentfc5f948260477e4c43e844be1abb09056174d69e
r15543: New implementation of 'net ads join' to be more like Windows XP.
The motivating factor is to not require more privileges for
the user account than Windows does when joining a domain.

The points of interest are

* net_ads_join() uses same rpc mechanisms as net_rpc_join()
* Enable CLDAP queries for filling in the majority of the
  ADS_STRUCT->config information
* Remove ldap_initialized() from sam/idmap_ad.c and
  libads/ldap.c
* Remove some unnecessary fields from ADS_STRUCT
* Manually set the dNSHostName and servicePrincipalName attribute
  using the machine account after the join

Thanks to Guenther and Simo for the review.

Still to do:

* Fix the userAccountControl for DES only systems
* Set the userPrincipalName in order to support things like
  'kinit -k' (although we might be able to just use the sAMAccountName
  instead)
* Re-add support for pre-creating the machine account in
  a specific OU
(This used to be commit 4c4ea7b20f44cd200cef8c7b389d51b72eccc39b)
16 files changed:
source3/Makefile.in
source3/include/ads.h
source3/include/ads_cldap.h [new file with mode: 0644]
source3/include/includes.h
source3/libads/ads_struct.c
source3/libads/cldap.c [moved from source3/utils/net_ads_cldap.c with 68% similarity]
source3/libads/ldap.c
source3/libsmb/namequery.c
source3/nsswitch/winbindd_cm.c
source3/printing/nt_printing.c
source3/sam/idmap_ad.c
source3/utils/net.c
source3/utils/net.h
source3/utils/net_ads.c
source3/utils/net_rpc.c
source3/utils/net_rpc_join.c