In this HowTo we use Samba as primary domain controller for centralized authentication of windows Clients
We Will Configure Samba PDC Server With Domain name corvit.com and also creates some users and make these users to be able login for domain corvit.com from different machines
We are using operating system for this howto is Centos 5.6
but this article will also work on other distributions like RedHat and Fedora etc…
Samba PDC Server Name and ip Address
Server.corvit.com
IP : 192.168.0.100
Windows Machines:
Windows XP Professional SP2
Computer Name : pc1
Domain Name : corvit.com
IP : 192.168.0.11
Lets Install packages via yum command.
Install these samba packages:
[root@server~]# yum install samba-common samba-client samba
Server Configuration:
Edit Samba Configuration file and make the following changes.
[root@server~]# vi /etc/samba/smb.conf
Uncomment (Remove ‘#’ for uncomment) the lines as shown below.
Changes in Global Section:
workgroup = corvit.com # NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
server string = Linux Domain Controller # server string is the equivalent of the NT Description field
local master = yes
preferred master = yes
os level = 64
domain master = yes
domain logons = yes
wins support = yes
security = user
In Share Definitions Section:
[homes] browseable = yes
writable = yes
[netlogon] path = /home/netlogon
writable = no
[Profiles] path = /home/profiles
writable = yes #should give. Else you will get ACCESS DENIED errors
Now Add Windows Machine Account in Samba
Now create a group named lanmachines and add a user with the name of windows client
[root@server ~]# groupadd lanmachines
[root@server ~]# useradd –M –s /sbin/nologin –g lanmachines pc1$
[root@sambapdc ~]# smbpasswd -m -a pc1
Now Start the samba service:
[root@server ~]# service smb start
[root@server ~]# chkconfig smb on
Now generate root samba password which we use for joining domains
[root@server ~]# smbpasswd –a root
#useradd waqas
#smbpasswd -a waqas
[root@server ~]# service smb restart
Client Side Configuration On windows machine:
Right click the My Computer icon go to properties
Click on Computer name tab
Enter Domain Name in Domain Tab corvit.com and hit enter.
you will be prompted for a username and password. Give root and its samba which we generate above password.
System may need to restart
After Restart you can login domain users on this machine
Hope you enjoy This Article
Don’t Forget to leave comments if you like this post