Samba LDAP Dfs PDC BDC etc

15 Jul

Notes on setting up Samba to be a PDC with Dfs shares

How Windows Domain logons work:
1. Client machine starts up, sends out Broadcast for a Domain Controller (DC)

2. DC’s respond that they are able to take logon

3. Client logs into DC

4. When DC receives logon, Samba handles it, and runs a user logon script (written by W*w*k/A*t*y). This script creates a batch file which that is placed in the user’s home directory /home/ and returns.

The Windows client then calls this batch file. Inside the batch file, are a whole bunch of ‘net use \server\share’ commands which set up mapped network drives. One of these will be the dfsroot for that user, e.g. /home//sharelinks.

This directory is actually a Samba share and when it is mapped, dfs links are created. This is because inside samba.conf there is something like:

> [sharelinks]
> comment = Links to shares for %U
> volume = ShareLinks
> root preexec = /usr/local/bin/user_dfsroot %U
> path = /home/%U/.dfsroot
> msdfs root = yes
> csc policy = documents

The preexec script ‘user_dfsroot’ creates a whole bunch of dfs links in the user’s home directory and returns. The ‘sharelinks’ mapped drive will now have a bunch of dfs links which appear as folders. (These dfs links can be to other machines etc).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: