Once the Kerberos and Samba are configured, it's time to add the pptpd server to the AD domain. For Samba version below 3.0.23:
[root@pptp ~]# net ads join -U skwok@EXAMPLENET.ORG "Asiapac/Australia/Sydney/Servers"
skwok@EXAMPLENET.ORG's password:
Using short domain name -- EXAMPLE
Joined 'PPTPDSVR' to realm 'EXAMPLENET.ORG'
For Samba version 3.0.23 or above:
[root@pptp ~]# net ads join -U skwok@EXAMPLENET.ORG createcomputer="Asiapac/Australia/Sydney/Servers" skwok@EXAMPLENET.ORG's password: Using short domain name -- EXAMPLEE Joined 'PPTPDSVR' to realm 'EXAMPLENET.ORG'
The above net ads join command creates the server in the container
"OU=Servers,OU=Sydney,OU=Australia,OU=Asiapac,DC=EXAMPLENET,DC=ORG"
The user must have admin right on the container to create the server object. If the operation is successful, you will see a new server object created in the AD.
Another test to see if the trust between the pptpd server and the domain is working is smbclient.
[root@pptp ~]# smbclient //dc1/c$ -k
OS=[Windows Server 2003 3790 Service Pack 1] Server=[Windows Server 2003 5.2]
smb: \> dir
AUTOEXEC.BAT A 0 Wed Jul 20 10:53:47 2005
boot.ini AHSR 208 Fri Jul 22 10:41:57 2005
CONFIG.SYS A 0 Wed Jul 20 10:53:47 2005
Documents and Settings D 0 Fri Jul 22 16:25:51 2005
download D 0 Thu Aug 4 17:31:28 2005
IO.SYS AHSR 0 Wed Jul 20 10:53:47 2005
MSDOS.SYS AHSR 0 Wed Jul 20 10:53:47 2005
NTDETECT.COM AHSR 47772 Fri Jul 22 10:16:32 2005
ntldr AHSR 295536 Fri Jul 22 10:16:32 2005
pagefile.sys AHS 805306368 Fri Aug 12 11:24:27 2005
Program Files DR 0 Wed Jul 20 10:51:09 2005
shared1 D 0 Thu Jul 21 17:06:28 2005
System Volume Information DHS 0 Fri Jul 22 10:52:09 2005
WINDOWS D 0 Tue Aug 16 14:33:36 2005
wmpub D 0 Wed Jul 20 10:55:13 200539064 blocks of size 524288. 31129 blocks available
smb: \>
Note: With Samba v3.0.14a or v3.0.20, everytime I run "net ads join", the command crash at the end with message "*** glibc detected *** net: free(): invalid pointer: 0x001cddb0 ***" and then a dump to the screen. The join seems to be working fine though. Samba v3.0.21a or above does not have this problem.