If you're on a network that already has a Windows domain and you want to join it so that people are authenticated into the Windows domain instead of onto your system, there are a few things you'll need to do.
First, on your Windows Domain Controller, add a computer account for your linux box. Make sure it has the same name, and make sure if you are using Windows 2000 domains you check the box that lets pre-win2k clients use that computer account.
Next, on the linux machine, type:
smbpasswd -j DOMAIN -r DC
Where "DOMAIN" is the windows domain to join, and "DC" is the domain controller to join to.
Following that, you will need to make changes to your /etc/samba/smb.conf to make sure that shares are being authenticated into your windows domain.
security = user
security = domain
Then, add the line:
password server = *
Save that file, restart samba, and you should be good to go!