I got the login to work now, but I think I may have founda bug. When the script added the machine account it gave it an RID of 3002, but when samba goes looking for it it searches for RID 501. I modified the RID to 501 in ldap and the logins work. Can someone explain this behavior to me?