<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slackwiki.com/index.php?action=history&amp;feed=atom&amp;title=Samba_As_PDC</id>
	<title>Samba As PDC - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slackwiki.com/index.php?action=history&amp;feed=atom&amp;title=Samba_As_PDC"/>
	<link rel="alternate" type="text/html" href="https://www.slackwiki.com/index.php?title=Samba_As_PDC&amp;action=history"/>
	<updated>2026-04-08T14:24:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://www.slackwiki.com/index.php?title=Samba_As_PDC&amp;diff=174&amp;oldid=prev</id>
		<title>Erik: Copy from old</title>
		<link rel="alternate" type="text/html" href="https://www.slackwiki.com/index.php?title=Samba_As_PDC&amp;diff=174&amp;oldid=prev"/>
		<updated>2009-06-06T23:18:26Z</updated>

		<summary type="html">&lt;p&gt;Copy from old&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
How to use Samba as a Primary Domain Controller&lt;br /&gt;
by dadexter&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tutorial will explain how to use Samba as a Primary&lt;br /&gt;
Domain Controller using OpenLDAP for authentication.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Why:&lt;br /&gt;
&lt;br /&gt;
A client of mine is migrating to a Linux server farm, and a mix of Linux&lt;br /&gt;
and Windows workstations. In order to do that, I set it up at home using&lt;br /&gt;
SlackWare.&lt;br /&gt;
&lt;br /&gt;
STEP 1&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
The first step in this exercise is to setup Samba to act as PDC. I did that&lt;br /&gt;
with the samba provided by a standard Slackware 10.1 install.&lt;br /&gt;
&lt;br /&gt;
First, we need a config file. Here's a copy of mine:&lt;br /&gt;
&lt;br /&gt;
    ; /etc/samba/smb.conf&lt;br /&gt;
    ; Machine: Cirion&lt;br /&gt;
    &lt;br /&gt;
    [global]&lt;br /&gt;
        workgroup = SIGTERM&lt;br /&gt;
        netbios name = Cirion&lt;br /&gt;
        server string = Domain Controller [Cirion]&lt;br /&gt;
        hosts allow = 192.168.100. 127.&lt;br /&gt;
    &lt;br /&gt;
        security = user&lt;br /&gt;
        encrypt passwords = yes&lt;br /&gt;
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192&lt;br /&gt;
        interfaces = lo eth0&lt;br /&gt;
        bind interfaces only = yes&lt;br /&gt;
        password level = 20&lt;br /&gt;
    &lt;br /&gt;
        local master = yes&lt;br /&gt;
        os level = 65&lt;br /&gt;
        domain master = yes&lt;br /&gt;
        preferred master = yes&lt;br /&gt;
        null passwords = no&lt;br /&gt;
        hide unreadable = yes&lt;br /&gt;
        hide dot files = yes&lt;br /&gt;
    &lt;br /&gt;
        domain logons = yes&lt;br /&gt;
        logon script = login.bat&lt;br /&gt;
        logon path = \\%L\profiles\%U&lt;br /&gt;
        logon drive = H:&lt;br /&gt;
        logon home = \\%L\%U\.9xprofile&lt;br /&gt;
        wins support = yes&lt;br /&gt;
        name resolve order = wins lmhosts hosts bcast&lt;br /&gt;
        dns proxy = no&lt;br /&gt;
        time server = yes&lt;br /&gt;
        log file = /var/log/samba/log.%m&lt;br /&gt;
        max log size = 50&lt;br /&gt;
        smb passwd file = /etc/samba/private/smbpasswd&lt;br /&gt;
    &lt;br /&gt;
        add user script = /usr/sbin/useradd -m %u&lt;br /&gt;
        delete user script = /usr/sbin/userdel -r %u&lt;br /&gt;
        add group script = /usr/sbin/groupadd %g&lt;br /&gt;
        delete group script = /usr/sbin/groupdel %g&lt;br /&gt;
        add user to group script = /usr/sbin/usermod -G %g %u&lt;br /&gt;
        add machine script = /usr/sbin/useradd -s /bin/false -d /dev/null %u&lt;br /&gt;
        passwd program = /usr/bin/passwd %u&lt;br /&gt;
        passwd chat = &amp;quot;*New password:*&amp;quot; %n\r &amp;quot;*New password (again):*&amp;quot; %n\r \ &amp;quot;*Password changed*&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    [netlogon]&lt;br /&gt;
        path = /var/lib/samba/netlogon&lt;br /&gt;
        public = no&lt;br /&gt;
        writeable = no&lt;br /&gt;
        browseable = no&lt;br /&gt;
    &lt;br /&gt;
    [profiles]&lt;br /&gt;
        path = /var/lib/samba/profiles&lt;br /&gt;
        browseable = no&lt;br /&gt;
        writeable = yes&lt;br /&gt;
        default case = lower&lt;br /&gt;
        preserve case = no&lt;br /&gt;
        short preserve case = no&lt;br /&gt;
        case sensitive = no&lt;br /&gt;
        hide files = /desktop.ini/ntuser.ini/NTUSER.*/&lt;br /&gt;
        write list = @users @root&lt;br /&gt;
        create mode = 0600&lt;br /&gt;
        directory mode = 0770&lt;br /&gt;
        nt acl support = Yes&lt;br /&gt;
    &lt;br /&gt;
    [homes]&lt;br /&gt;
        comment = Home Directories&lt;br /&gt;
        browseable = no&lt;br /&gt;
        read only = no&lt;br /&gt;
        create mode = 0750&lt;br /&gt;
        path = /home/%U&lt;br /&gt;
        valid users = %S&lt;br /&gt;
        guest ok = no&lt;br /&gt;
    &lt;br /&gt;
    [winstuff]&lt;br /&gt;
        comment = Windows Stuff&lt;br /&gt;
        path = /usr/local/site/windows&lt;br /&gt;
        public = yes&lt;br /&gt;
        writeable = no&lt;br /&gt;
        browseable = yes&lt;br /&gt;
        write list = @users&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
After the config file is created, restart Samba by issuing the following command&lt;br /&gt;
as root:&lt;br /&gt;
&lt;br /&gt;
    '''/etc/rc.d/rc.samba stop'''&lt;br /&gt;
    '''/etc/rc.d/rc.samba start'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, we need to add our users to Samba. Please note that is temporary for step 1.&lt;br /&gt;
We will replace that with LDAP authentication in step 3.&lt;br /&gt;
&lt;br /&gt;
    '''smbpasswd -a root'''&lt;br /&gt;
    '''smbpasswd -a &amp;lt;USER&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
The 1st command is required to be able to add your Windows machines to the Domain.&lt;br /&gt;
Run the 2nd one for every user you want to login to this PDC.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
More to come... I'm not done with the setup.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:Dadexter|dadexter]] 23:51, 27 Aug 2005 (GMT)&lt;/div&gt;</summary>
		<author><name>Erik</name></author>
	</entry>
</feed>