This is a very simplified set of instructions targeted at Burgett Systems employess and some of our savy cutomers. If you are interested in further documenation on the subject:
The Samba Howto Collection
http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/
Section on Machine Accounts
http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/domain-member.html#machine-trust-accounts
The name of the windows machine is barrett and the name of the Samba controlled domain is CES in this example.
Before you start
Make sure the Windows machine is in a workgroup, not a domain, and that the workgroup name is not the same as the domain name. Also, make sure that you login to the local machine's domain (and not the Samba controlled domain when joining (this avoids making any connections to the server throught login scripts etc which get cached and mess up the process). There are some ways to clear cached connections - covered at the end of these instructions if you are in that situation for some reason.
The Process
1) ssh to the server and get logged in, su to root.
2) Add the unix user that the machine acccount will map to, which is the machine name with a $ added to it.
server:/~# useradd barrett$
3) Create a samba machine account for the machine. Note there is no $
server:~# smbpasswd -a -m barrett
the server should come back with something like this
Added user barrett$.
4) Ok, on the windows machine, use the username root and your root password to join the machine to the domain when prompted to provide a username "with permissions to join the machine to the domain".
The windows machine should come back with a "Welcome to the CES Domain" message. Reboot and you should be all set.
My most common error joing machines has been "the credentials you supplied conflict with an existing set of credentials". This happens because you already connected to the server somehow, and windows cached that as your credentials (maybe you had to get a file from the server or a logon script ran or something).
You can clear that error with this:
C:\> net use * /d
If you run into problems joing the machine to the domain, check these common errors:
http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/samba-pdc.html#id2518672