interview question and answer

July 15, 2012

Samba as Primary Domain Controller in CentOS 6

Samba as Primary Domain Controller in CentOS 6


Step 1: Installing Samba
All the necessary RPM should be present in the installation media (CD/DVD). If needed, the online repository of repoforge.org is very good too.



Step 2: Preparing the Configuration Files
Now that Samba is installed, it is time to prepare the configuration file. I've said it before and I'll say it again, it's always a good idea to back up the .conf file before modifying.


Here are the modifications




Step 3: Starting the Service




It can be seen from the netstat output that the domain controller is running and is listening to port 137 & 138.

Step 4: User Management
To add clients into the domain, both machine and human users must be created. There are a couple of steps, but it's not hard.




Now that the Unix users are created, time to create the samba users.




Step 5: Adding Windows Client Machine
I'd be demonstrating the procedure for WinXP only. The process is almost identical for all Windows versions. First, we need to login as administrator.


  1. Start > My Computer (Right Click) > Properties
  2. Computer Name > Change
  3. Set the computer name and domain
  4. Enter administrative samba username and password i.e. user: root and password set by smbpasswd -a root
  5. Reboot


After successfully adding the machine into the domain, the workstation needs to be restarted. After restarting, we simply login using the domain user.

Logging in

Work Complete.

Note:
This configuration will not work with netlogons. Personally, I don't like netlogons because it
  • creates additional traffic inside the network.
  • login processes are pretty slow, depends on the volume of user data and the network infrastructure.
  • server hard disk gets full quickly if user quota is not maintained strictly.

 

No comments: