This hint is for the ones want connect their Mac under a domain called MYDOMAIN served by a NTServer (or linux/samba server) called MYSERVER on a Windows network, and you want the to Mac get permissions and users from the domain controller (once again MYSERVER).
First of all open Directory Access application in Utility, click on padlock icon to grant permission and write your password. Select SMB from the list and then click on "Configure..." button. In the workgroup field box type your domain name (MYDOMAIN in this explanation) select OK then Apply button. Quit Directory Access. From now on, your Mac is connected to the domain MYDOMAIN and you will see all servers under this domain.
Now you need to edit, with root permissions, smb.conf in /etc. I use vi, but you can choose whatever else text editor. Opened smb.conf make a new line under workgruop = MYDOMAIN and enter the follow code:
password server = *
security = domain
hide files = .Trashes/Temporary Items/Desktop */TheFindByContentFolder/
TheVolumeSettingsFolder/.DS_Store/.AppleDouble/
NOTE: The hide files line is shown on two lines; enter it as one with no added spaces.
[MYSHARE]
path = <b>/Volumes/MysecondHD/Afolder</b>
public = yes
browseable = yes
writable = yes
force create mask = 0775
force create mask = 0775
force user = <b>myuser</b>
force group = unknown
hide dot files = yes
This is only an example of a share; you can put how many share you want following this scheme. The things you need to change are the name (MYSHARE in example), the path (/Volumes/MysecondHD/Afolder), and the user (myuser). Is important to change the user to one already existing on your Mac; even better if that user has admin permissions. Now save smb.conf and type in a terminal the following command:
sudo net join -U Administrator
I assumed that your network user administrator is called "Administrator," if not then change the line accordingly. At the first prompt, enter your Mac password and hit return. At the second prompt, enter the network administrator password and hit return.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20031126092056370