Samba NT Domain Controller
The domain concept is much better than the traditional workgroup concept. One of the primary benefits is having a centralized password database on the Primary Domain Controller. Once authenticated, you can access any of the shares in the domain, without having to re-authenticate yourself.
If you're unfamiliar with Samba, then we've got a couple of good howto's that you can refer to. Look for links to them at the bottom of the article.
Samba as a NT Domain Member
Samba emulates a NT workstation when becoming part of the domain. So, the first thing you need to do is create a machine account for your Samba machine on the domain controller. In NT you would use the program Server Manager for Domains to create the account. Once the account is created, all you need to add are the following lines to your smb.conf file under the global section.
# Your Workgroup or Domain that you want # to login to workgroup = FREEOS # Tell Samba to talk to domain controller # for authentication security = domain # Specify the server to get authenticate # from. You can specify the # NetBIOS # names of the servers or simply # put in a "*" here to let # Samba find the server through broadcast password server = PS1 PS2 # Make sure Samba is using encrypted # passwords encrypt passwords = yes Now stop the Samba daemons /etc/rc.d/init.d/smb stop Give the following command to join the NT Domain smbpasswd -j DOMAIN -r DOMAINPDC
DOMAIN here is the domain that you want to log on to. DOMAINPDC is the primary domain controller for that domain. You will then see a message saying, “Joined domain DOMAIN”.
Now start your SMB and NMB daemons.
/etc/rc.d/init.d/smb start
That was all about joining an NT domain. Setting up Samba as your Primary Domain Controller is not very difficult.
Samba as Primary Domain Controller
Add the following to the global section of your smb.conf file.