[Patch] Updated patch for Samba v3.0

Graham Leggett <[email protected]> Thu, 11 Mar 2004 04:23:48 +0200
Newsgroups gmane.network.directoryadmin
Message-ID <[email protected]>
Hi,

I managed to figure out the glade stuff, so now you can choose the 
domain you are a member of via a dropdown box.

I have dropped the conditional stuff for Samba v2.2, as it's not 
practical to support both versions at the same time.

This patch is also a lot better tested than the last patch I posted. 
Feedback welcome! :)

Regards,
Graham
--
samba-3-2-patch (text/plain, 67.6 KB)
Only in directory_administrator-1.5.1-new: config.h
Only in directory_administrator-1.5.1-new: config.log
Only in directory_administrator-1.5.1-new: config.status
diff -r -u directory_administrator-1.5.1/directory_administrator.glade directory_administrator-1.5.1-new/directory_administrator.glade
--- directory_administrator-1.5.1/directory_administrator.glade	2003-06-12 14:39:32.000000000 +0200
+++ directory_administrator-1.5.1-new/directory_administrator.glade	2004-03-11 03:39:04.000000000 +0200
@@ -3369,13 +3369,8 @@
 	      <spacing>13</spacing>
 
 	      <widget>
-		<class>GtkTable</class>
-		<name>table67</name>
-		<rows>5</rows>
-		<columns>2</columns>
-		<homogeneous>False</homogeneous>
-		<row_spacing>4</row_spacing>
-		<column_spacing>16</column_spacing>
+		<class>GtkEventBox</class>
+		<name>eventbox2</name>
 		<child>
 		  <padding>0</padding>
 		  <expand>True</expand>
@@ -3383,246 +3378,333 @@
 		</child>
 
 		<widget>
-		  <class>GtkLabel</class>
-		  <name>label366</name>
-		  <label>Home _drive _letter:</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <child>
-		    <left_attach>0</left_attach>
-		    <right_attach>1</right_attach>
-		    <top_attach>1</top_attach>
-		    <bottom_attach>2</bottom_attach>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <xexpand>False</xexpand>
-		    <yexpand>False</yexpand>
-		    <xshrink>False</xshrink>
-		    <yshrink>False</yshrink>
-		    <xfill>False</xfill>
-		    <yfill>False</yfill>
-		  </child>
-		</widget>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <name>label367</name>
-		  <label>Path to _home directory:</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <child>
-		    <left_attach>0</left_attach>
-		    <right_attach>1</right_attach>
-		    <top_attach>0</top_attach>
-		    <bottom_attach>1</bottom_attach>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <xexpand>False</xexpand>
-		    <yexpand>False</yexpand>
-		    <xshrink>False</xshrink>
-		    <yshrink>False</yshrink>
-		    <xfill>False</xfill>
-		    <yfill>False</yfill>
-		  </child>
-		</widget>
-
-		<widget>
 		  <class>GtkAlignment</class>
-		  <name>alignment72</name>
-		  <xalign>7.45058e-09</xalign>
+		  <name>alignment119</name>
+		  <xalign>0.5</xalign>
 		  <yalign>0.5</yalign>
-		  <xscale>3.46452e-07</xscale>
+		  <xscale>1</xscale>
 		  <yscale>1</yscale>
-		  <child>
-		    <left_attach>1</left_attach>
-		    <right_attach>2</right_attach>
-		    <top_attach>0</top_attach>
-		    <bottom_attach>1</bottom_attach>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <xexpand>True</xexpand>
-		    <yexpand>False</yexpand>
-		    <xshrink>False</xshrink>
-		    <yshrink>False</yshrink>
-		    <xfill>True</xfill>
-		    <yfill>False</yfill>
-		  </child>
 
 		  <widget>
-		    <class>GtkEntry</class>
-		    <name>smbHome</name>
-		    <width>140</width>
-		    <can_focus>True</can_focus>
-		    <editable>True</editable>
-		    <text_visible>True</text_visible>
-		    <text_max_length>0</text_max_length>
-		    <text></text>
-		  </widget>
-		</widget>
+		    <class>GtkTable</class>
+		    <name>table67</name>
+		    <rows>6</rows>
+		    <columns>2</columns>
+		    <homogeneous>False</homogeneous>
+		    <row_spacing>4</row_spacing>
+		    <column_spacing>16</column_spacing>
 
-		<widget>
-		  <class>GtkAlignment</class>
-		  <name>alignment73</name>
-		  <xalign>7.45058e-09</xalign>
-		  <yalign>0.5</yalign>
-		  <xscale>0</xscale>
-		  <yscale>1</yscale>
-		  <child>
-		    <left_attach>1</left_attach>
-		    <right_attach>2</right_attach>
-		    <top_attach>1</top_attach>
-		    <bottom_attach>2</bottom_attach>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <xexpand>True</xexpand>
-		    <yexpand>False</yexpand>
-		    <xshrink>False</xshrink>
-		    <yshrink>False</yshrink>
-		    <xfill>True</xfill>
-		    <yfill>False</yfill>
-		  </child>
+		    <widget>
+		      <class>GtkLabel</class>
+		      <name>label366</name>
+		      <label>Home _drive _letter:</label>
+		      <justify>GTK_JUSTIFY_CENTER</justify>
+		      <wrap>False</wrap>
+		      <xalign>0.5</xalign>
+		      <yalign>0.5</yalign>
+		      <xpad>0</xpad>
+		      <ypad>0</ypad>
+		      <child>
+			<left_attach>0</left_attach>
+			<right_attach>1</right_attach>
+			<top_attach>2</top_attach>
+			<bottom_attach>3</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>False</xexpand>
+			<yexpand>False</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>False</xfill>
+			<yfill>False</yfill>
+		      </child>
+		    </widget>
 
-		  <widget>
-		    <class>GtkEntry</class>
-		    <name>homeDrive</name>
-		    <width>29</width>
-		    <can_focus>True</can_focus>
-		    <editable>True</editable>
-		    <text_visible>True</text_visible>
-		    <text_max_length>2</text_max_length>
-		    <text></text>
-		  </widget>
-		</widget>
+		    <widget>
+		      <class>GtkLabel</class>
+		      <name>label367</name>
+		      <label>Path to _home directory:</label>
+		      <justify>GTK_JUSTIFY_CENTER</justify>
+		      <wrap>False</wrap>
+		      <xalign>0.5</xalign>
+		      <yalign>0.5</yalign>
+		      <xpad>0</xpad>
+		      <ypad>0</ypad>
+		      <child>
+			<left_attach>0</left_attach>
+			<right_attach>1</right_attach>
+			<top_attach>1</top_attach>
+			<bottom_attach>2</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>False</xexpand>
+			<yexpand>False</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>False</xfill>
+			<yfill>False</yfill>
+		      </child>
+		    </widget>
 
-		<widget>
-		  <class>GtkLabel</class>
-		  <name>label368</name>
-		  <label>Path _to profile directory:</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <default_focus_target>profilePath</default_focus_target>
-		  <child>
-		    <left_attach>0</left_attach>
-		    <right_attach>1</right_attach>
-		    <top_attach>3</top_attach>
-		    <bottom_attach>4</bottom_attach>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <xexpand>False</xexpand>
-		    <yexpand>False</yexpand>
-		    <xshrink>False</xshrink>
-		    <yshrink>False</yshrink>
-		    <xfill>False</xfill>
-		    <yfill>False</yfill>
-		  </child>
-		</widget>
+		    <widget>
+		      <class>GtkAlignment</class>
+		      <name>alignment72</name>
+		      <xalign>7.45058e-09</xalign>
+		      <yalign>0.5</yalign>
+		      <xscale>3.46452e-07</xscale>
+		      <yscale>1</yscale>
+		      <child>
+			<left_attach>1</left_attach>
+			<right_attach>2</right_attach>
+			<top_attach>1</top_attach>
+			<bottom_attach>2</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>True</xexpand>
+			<yexpand>False</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>True</xfill>
+			<yfill>False</yfill>
+		      </child>
+
+		      <widget>
+			<class>GtkEntry</class>
+			<name>sambaHomePath</name>
+			<width>140</width>
+			<can_focus>True</can_focus>
+			<editable>True</editable>
+			<text_visible>True</text_visible>
+			<text_max_length>0</text_max_length>
+			<text></text>
+		      </widget>
+		    </widget>
+
+		    <widget>
+		      <class>GtkAlignment</class>
+		      <name>alignment73</name>
+		      <xalign>7.45058e-09</xalign>
+		      <yalign>0.5</yalign>
+		      <xscale>0</xscale>
+		      <yscale>1</yscale>
+		      <child>
+			<left_attach>1</left_attach>
+			<right_attach>2</right_attach>
+			<top_attach>2</top_attach>
+			<bottom_attach>3</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>True</xexpand>
+			<yexpand>False</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>True</xfill>
+			<yfill>False</yfill>
+		      </child>
+
+		      <widget>
+			<class>GtkEntry</class>
+			<name>sambaHomeDrive</name>
+			<width>29</width>
+			<can_focus>True</can_focus>
+			<editable>True</editable>
+			<text_visible>True</text_visible>
+			<text_max_length>2</text_max_length>
+			<text></text>
+		      </widget>
+		    </widget>
+
+		    <widget>
+		      <class>GtkLabel</class>
+		      <name>label368</name>
+		      <label>Path _to profile directory:</label>
+		      <justify>GTK_JUSTIFY_CENTER</justify>
+		      <wrap>False</wrap>
+		      <xalign>0.5</xalign>
+		      <yalign>0.5</yalign>
+		      <xpad>0</xpad>
+		      <ypad>0</ypad>
+		      <default_focus_target>sambaProfilePath</default_focus_target>
+		      <child>
+			<left_attach>0</left_attach>
+			<right_attach>1</right_attach>
+			<top_attach>4</top_attach>
+			<bottom_attach>5</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>False</xexpand>
+			<yexpand>False</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>False</xfill>
+			<yfill>False</yfill>
+		      </child>
+		    </widget>
+
+		    <widget>
+		      <class>GtkLabel</class>
+		      <name>label369</name>
+		      <label>_Logon script file name:</label>
+		      <justify>GTK_JUSTIFY_CENTER</justify>
+		      <wrap>False</wrap>
+		      <xalign>0.5</xalign>
+		      <yalign>0.5</yalign>
+		      <xpad>0</xpad>
+		      <ypad>0</ypad>
+		      <default_focus_target>sambaLogonScript</default_focus_target>
+		      <child>
+			<left_attach>0</left_attach>
+			<right_attach>1</right_attach>
+			<top_attach>5</top_attach>
+			<bottom_attach>6</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>False</xexpand>
+			<yexpand>False</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>False</xfill>
+			<yfill>False</yfill>
+		      </child>
+		    </widget>
+
+		    <widget>
+		      <class>GtkEntry</class>
+		      <name>sambaProfilePath</name>
+		      <width>140</width>
+		      <can_focus>True</can_focus>
+		      <editable>True</editable>
+		      <text_visible>True</text_visible>
+		      <text_max_length>0</text_max_length>
+		      <text></text>
+		      <child>
+			<left_attach>1</left_attach>
+			<right_attach>2</right_attach>
+			<top_attach>4</top_attach>
+			<bottom_attach>5</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>False</xexpand>
+			<yexpand>False</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>True</xfill>
+			<yfill>False</yfill>
+		      </child>
+		    </widget>
+
+		    <widget>
+		      <class>GtkEntry</class>
+		      <name>sambaLogonScript</name>
+		      <width>140</width>
+		      <can_focus>True</can_focus>
+		      <editable>True</editable>
+		      <text_visible>True</text_visible>
+		      <text_max_length>0</text_max_length>
+		      <text></text>
+		      <child>
+			<left_attach>1</left_attach>
+			<right_attach>2</right_attach>
+			<top_attach>5</top_attach>
+			<bottom_attach>6</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>True</xexpand>
+			<yexpand>False</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>True</xfill>
+			<yfill>False</yfill>
+		      </child>
+		    </widget>
 
-		<widget>
-		  <class>GtkLabel</class>
-		  <name>label369</name>
-		  <label>_Logon script file name:</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <default_focus_target>scriptPath</default_focus_target>
-		  <child>
-		    <left_attach>0</left_attach>
-		    <right_attach>1</right_attach>
-		    <top_attach>4</top_attach>
-		    <bottom_attach>5</bottom_attach>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <xexpand>False</xexpand>
-		    <yexpand>False</yexpand>
-		    <xshrink>False</xshrink>
-		    <yshrink>False</yshrink>
-		    <xfill>False</xfill>
-		    <yfill>False</yfill>
-		  </child>
-		</widget>
+		    <widget>
+		      <class>GtkHSeparator</class>
+		      <name>hseparator7</name>
+		      <child>
+			<left_attach>0</left_attach>
+			<right_attach>2</right_attach>
+			<top_attach>3</top_attach>
+			<bottom_attach>4</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>False</xexpand>
+			<yexpand>True</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>True</xfill>
+			<yfill>True</yfill>
+		      </child>
+		    </widget>
 
-		<widget>
-		  <class>GtkEntry</class>
-		  <name>profilePath</name>
-		  <width>140</width>
-		  <can_focus>True</can_focus>
-		  <editable>True</editable>
-		  <text_visible>True</text_visible>
-		  <text_max_length>0</text_max_length>
-		  <text></text>
-		  <child>
-		    <left_attach>1</left_attach>
-		    <right_attach>2</right_attach>
-		    <top_attach>3</top_attach>
-		    <bottom_attach>4</bottom_attach>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <xexpand>False</xexpand>
-		    <yexpand>False</yexpand>
-		    <xshrink>False</xshrink>
-		    <yshrink>False</yshrink>
-		    <xfill>True</xfill>
-		    <yfill>False</yfill>
-		  </child>
-		</widget>
+		    <widget>
+		      <class>GtkLabel</class>
+		      <name>label460</name>
+		      <label>Windows Domain</label>
+		      <justify>GTK_JUSTIFY_CENTER</justify>
+		      <wrap>False</wrap>
+		      <xalign>0</xalign>
+		      <yalign>0.5</yalign>
+		      <xpad>0</xpad>
+		      <ypad>0</ypad>
+		      <child>
+			<left_attach>0</left_attach>
+			<right_attach>1</right_attach>
+			<top_attach>0</top_attach>
+			<bottom_attach>1</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>False</xexpand>
+			<yexpand>False</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>False</xfill>
+			<yfill>False</yfill>
+		      </child>
+		    </widget>
 
-		<widget>
-		  <class>GtkEntry</class>
-		  <name>scriptPath</name>
-		  <width>140</width>
-		  <can_focus>True</can_focus>
-		  <editable>True</editable>
-		  <text_visible>True</text_visible>
-		  <text_max_length>0</text_max_length>
-		  <text></text>
-		  <child>
-		    <left_attach>1</left_attach>
-		    <right_attach>2</right_attach>
-		    <top_attach>4</top_attach>
-		    <bottom_attach>5</bottom_attach>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <xexpand>True</xexpand>
-		    <yexpand>False</yexpand>
-		    <xshrink>False</xshrink>
-		    <yshrink>False</yshrink>
-		    <xfill>True</xfill>
-		    <yfill>False</yfill>
-		  </child>
-		</widget>
+		    <widget>
+		      <class>GtkCombo</class>
+		      <name>sambaDomainNameDropdown</name>
+		      <width>140</width>
+		      <signal>
+			<name>realize</name>
+			<handler>on_sambaDomainNameDropdown_realize</handler>
+			<last_modification_time>Thu, 11 Mar 2004 01:25:13 GMT</last_modification_time>
+		      </signal>
+		      <value_in_list>True</value_in_list>
+		      <ok_if_empty>True</ok_if_empty>
+		      <case_sensitive>False</case_sensitive>
+		      <use_arrows>True</use_arrows>
+		      <use_arrows_always>False</use_arrows_always>
+		      <items></items>
+		      <child>
+			<left_attach>1</left_attach>
+			<right_attach>2</right_attach>
+			<top_attach>0</top_attach>
+			<bottom_attach>1</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>True</xexpand>
+			<yexpand>False</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>True</xfill>
+			<yfill>False</yfill>
+		      </child>
 
-		<widget>
-		  <class>GtkHSeparator</class>
-		  <name>hseparator7</name>
-		  <child>
-		    <left_attach>0</left_attach>
-		    <right_attach>2</right_attach>
-		    <top_attach>2</top_attach>
-		    <bottom_attach>3</bottom_attach>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <xexpand>False</xexpand>
-		    <yexpand>True</yexpand>
-		    <xshrink>False</xshrink>
-		    <yshrink>False</yshrink>
-		    <xfill>True</xfill>
-		    <yfill>True</yfill>
-		  </child>
+		      <widget>
+			<class>GtkEntry</class>
+			<child_name>GtkCombo:entry</child_name>
+			<name>sambaDomainName</name>
+			<can_focus>True</can_focus>
+			<editable>False</editable>
+			<text_visible>True</text_visible>
+			<text_max_length>0</text_max_length>
+			<text></text>
+		      </widget>
+		    </widget>
+		  </widget>
 		</widget>
 	      </widget>
 
@@ -9686,7 +9768,7 @@
 		  <widget>
 		    <class>GtkTable</class>
 		    <name>table86</name>
-		    <rows>5</rows>
+		    <rows>6</rows>
 		    <columns>2</columns>
 		    <homogeneous>False</homogeneous>
 		    <row_spacing>4</row_spacing>
@@ -9710,8 +9792,8 @@
 		      <child>
 			<left_attach>0</left_attach>
 			<right_attach>1</right_attach>
-			<top_attach>1</top_attach>
-			<bottom_attach>2</bottom_attach>
+			<top_attach>2</top_attach>
+			<bottom_attach>3</bottom_attach>
 			<xpad>0</xpad>
 			<ypad>0</ypad>
 			<xexpand>False</xexpand>
@@ -9736,8 +9818,8 @@
 		      <child>
 			<left_attach>0</left_attach>
 			<right_attach>1</right_attach>
-			<top_attach>0</top_attach>
-			<bottom_attach>1</bottom_attach>
+			<top_attach>1</top_attach>
+			<bottom_attach>2</bottom_attach>
 			<xpad>0</xpad>
 			<ypad>0</ypad>
 			<xexpand>False</xexpand>
@@ -9759,8 +9841,8 @@
 		      <child>
 			<left_attach>1</left_attach>
 			<right_attach>2</right_attach>
-			<top_attach>0</top_attach>
-			<bottom_attach>1</bottom_attach>
+			<top_attach>1</top_attach>
+			<bottom_attach>2</bottom_attach>
 			<xpad>0</xpad>
 			<ypad>0</ypad>
 			<xexpand>True</xexpand>
@@ -9773,7 +9855,7 @@
 
 		      <widget>
 			<class>GtkEntry</class>
-			<name>smbHome</name>
+			<name>sambaHomePath</name>
 			<width>140</width>
 			<can_focus>True</can_focus>
 			<editable>True</editable>
@@ -9793,8 +9875,8 @@
 		      <child>
 			<left_attach>1</left_attach>
 			<right_attach>2</right_attach>
-			<top_attach>1</top_attach>
-			<bottom_attach>2</bottom_attach>
+			<top_attach>2</top_attach>
+			<bottom_attach>3</bottom_attach>
 			<xpad>0</xpad>
 			<ypad>0</ypad>
 			<xexpand>True</xexpand>
@@ -9807,7 +9889,7 @@
 
 		      <widget>
 			<class>GtkEntry</class>
-			<name>homeDrive</name>
+			<name>sambaHomeDrive</name>
 			<width>29</width>
 			<can_focus>True</can_focus>
 			<editable>True</editable>
@@ -9827,12 +9909,12 @@
 		      <yalign>0.5</yalign>
 		      <xpad>0</xpad>
 		      <ypad>0</ypad>
-		      <default_focus_target>profilePath</default_focus_target>
+		      <default_focus_target>sambaProfilePath</default_focus_target>
 		      <child>
 			<left_attach>0</left_attach>
 			<right_attach>1</right_attach>
-			<top_attach>3</top_attach>
-			<bottom_attach>4</bottom_attach>
+			<top_attach>4</top_attach>
+			<bottom_attach>5</bottom_attach>
 			<xpad>0</xpad>
 			<ypad>0</ypad>
 			<xexpand>False</xexpand>
@@ -9854,12 +9936,12 @@
 		      <yalign>0.5</yalign>
 		      <xpad>0</xpad>
 		      <ypad>0</ypad>
-		      <default_focus_target>scriptPath</default_focus_target>
+		      <default_focus_target>sambaLogonScript</default_focus_target>
 		      <child>
 			<left_attach>0</left_attach>
 			<right_attach>1</right_attach>
-			<top_attach>4</top_attach>
-			<bottom_attach>5</bottom_attach>
+			<top_attach>5</top_attach>
+			<bottom_attach>6</bottom_attach>
 			<xpad>0</xpad>
 			<ypad>0</ypad>
 			<xexpand>False</xexpand>
@@ -9873,7 +9955,7 @@
 
 		    <widget>
 		      <class>GtkEntry</class>
-		      <name>profilePath</name>
+		      <name>sambaProfilePath</name>
 		      <width>140</width>
 		      <can_focus>True</can_focus>
 		      <editable>True</editable>
@@ -9883,8 +9965,8 @@
 		      <child>
 			<left_attach>1</left_attach>
 			<right_attach>2</right_attach>
-			<top_attach>3</top_attach>
-			<bottom_attach>4</bottom_attach>
+			<top_attach>4</top_attach>
+			<bottom_attach>5</bottom_attach>
 			<xpad>0</xpad>
 			<ypad>0</ypad>
 			<xexpand>False</xexpand>
@@ -9898,7 +9980,7 @@
 
 		    <widget>
 		      <class>GtkEntry</class>
-		      <name>scriptPath</name>
+		      <name>sambaLogonScript</name>
 		      <width>140</width>
 		      <can_focus>True</can_focus>
 		      <editable>True</editable>
@@ -9908,8 +9990,8 @@
 		      <child>
 			<left_attach>1</left_attach>
 			<right_attach>2</right_attach>
-			<top_attach>4</top_attach>
-			<bottom_attach>5</bottom_attach>
+			<top_attach>5</top_attach>
+			<bottom_attach>6</bottom_attach>
 			<xpad>0</xpad>
 			<ypad>0</ypad>
 			<xexpand>True</xexpand>
@@ -9927,8 +10009,8 @@
 		      <child>
 			<left_attach>0</left_attach>
 			<right_attach>2</right_attach>
-			<top_attach>2</top_attach>
-			<bottom_attach>3</bottom_attach>
+			<top_attach>3</top_attach>
+			<bottom_attach>4</bottom_attach>
 			<xpad>0</xpad>
 			<ypad>0</ypad>
 			<xexpand>False</xexpand>
@@ -9939,6 +10021,74 @@
 			<yfill>True</yfill>
 		      </child>
 		    </widget>
+
+		    <widget>
+		      <class>GtkCombo</class>
+		      <name>sambaDomainNameDropdown</name>
+		      <width>140</width>
+		      <signal>
+			<name>realize</name>
+			<handler>on_sambaDomainNameDropdown_realize</handler>
+			<last_modification_time>Thu, 11 Mar 2004 01:24:52 GMT</last_modification_time>
+		      </signal>
+		      <value_in_list>True</value_in_list>
+		      <ok_if_empty>True</ok_if_empty>
+		      <case_sensitive>False</case_sensitive>
+		      <use_arrows>True</use_arrows>
+		      <use_arrows_always>False</use_arrows_always>
+		      <items></items>
+		      <child>
+			<left_attach>1</left_attach>
+			<right_attach>2</right_attach>
+			<top_attach>0</top_attach>
+			<bottom_attach>1</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>True</xexpand>
+			<yexpand>False</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>True</xfill>
+			<yfill>False</yfill>
+		      </child>
+
+		      <widget>
+			<class>GtkEntry</class>
+			<child_name>GtkCombo:entry</child_name>
+			<name>sambaDomainName</name>
+			<can_focus>True</can_focus>
+			<editable>False</editable>
+			<text_visible>True</text_visible>
+			<text_max_length>0</text_max_length>
+			<text></text>
+		      </widget>
+		    </widget>
+
+		    <widget>
+		      <class>GtkLabel</class>
+		      <name>label461</name>
+		      <label>Windows Domain</label>
+		      <justify>GTK_JUSTIFY_CENTER</justify>
+		      <wrap>False</wrap>
+		      <xalign>0</xalign>
+		      <yalign>0.5</yalign>
+		      <xpad>0</xpad>
+		      <ypad>0</ypad>
+		      <child>
+			<left_attach>0</left_attach>
+			<right_attach>1</right_attach>
+			<top_attach>0</top_attach>
+			<bottom_attach>1</bottom_attach>
+			<xpad>0</xpad>
+			<ypad>0</ypad>
+			<xexpand>False</xexpand>
+			<yexpand>False</yexpand>
+			<xshrink>False</xshrink>
+			<yshrink>False</yshrink>
+			<xfill>False</xfill>
+			<yfill>False</yfill>
+		      </child>
+		    </widget>
 		  </widget>
 
 		  <widget>
Only in directory_administrator-1.5.1-new/macros: Makefile
Only in directory_administrator-1.5.1-new: Makefile
Only in directory_administrator-1.5.1-new/src: appfunctions.o
diff -r -u directory_administrator-1.5.1/src/callbacks.c directory_administrator-1.5.1-new/src/callbacks.c
--- directory_administrator-1.5.1/src/callbacks.c	2003-06-12 15:26:40.000000000 +0200
+++ directory_administrator-1.5.1-new/src/callbacks.c	2004-03-11 03:55:49.000000000 +0200
@@ -44,6 +44,7 @@
 #include "icon_entry.h"
 #include "dir_entry.h"
 #include "charset.h"
+#include "schema.h"
 
 void
 on_exit1_activate (GtkMenuItem * menuitem, gpointer user_data)
@@ -2049,7 +2050,7 @@
       gtk_widget_show (lookup_widget (GTK_WIDGET (togglebutton),
 				      "framesamba"));
 					        gtk_widget_grab_focus(lookup_widget
-				(GTK_WIDGET (togglebutton), "smbHome"));
+				(GTK_WIDGET (togglebutton), SAMBA_HOME_PATH));
 
     }
   else
@@ -2596,3 +2597,16 @@
 
 }
 
+
+void
+on_sambaDomainNameDropdown_realize     (GtkWidget       *widget,
+                                        gpointer         user_data)
+{
+  connection_profile *usethisone = NULL;
+  usethisone = current_connection_profile;
+    
+  gtk_combo_set_popdown_strings (GTK_COMBO (widget),
+				 diradmin_user_sambadomains_from_ldap(usethisone));
+
+}
+
diff -r -u directory_administrator-1.5.1/src/callbacks.h directory_administrator-1.5.1-new/src/callbacks.h
--- directory_administrator-1.5.1/src/callbacks.h	2003-06-12 12:41:07.000000000 +0200
+++ directory_administrator-1.5.1-new/src/callbacks.h	2004-03-11 03:25:17.000000000 +0200
@@ -671,3 +671,7 @@
 void
 on_preferences_show                    (GtkWidget       *widget,
                                         gpointer         user_data);
+
+void
+on_sambaDomainNameDropdown_realize     (GtkWidget       *widget,
+                                        gpointer         user_data);
Only in directory_administrator-1.5.1-new/src: callbacks.o
Only in directory_administrator-1.5.1-new/src: charset.o
Only in directory_administrator-1.5.1-new/src: connect_dialog.o
Only in directory_administrator-1.5.1-new/src: .deps
Only in directory_administrator-1.5.1-new/src: directory_administrator
Only in directory_administrator-1.5.1-new/src: dir_entry.o
Only in directory_administrator-1.5.1-new/src: groups.o
Only in directory_administrator-1.5.1-new/src: icon_entry.o
diff -r -u directory_administrator-1.5.1/src/interface.c directory_administrator-1.5.1-new/src/interface.c
--- directory_administrator-1.5.1/src/interface.c	2003-06-12 14:39:32.000000000 +0200
+++ directory_administrator-1.5.1-new/src/interface.c	2004-03-11 03:39:04.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * NO EDITE ESTE ARCHIVO - esta generado por Glade.
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -1318,20 +1318,25 @@
   GtkWidget *framesamba;
   GtkWidget *alignment71;
   GtkWidget *vbox53;
+  GtkWidget *eventbox2;
+  GtkWidget *alignment119;
   GtkWidget *table67;
   GtkWidget *label366;
   GtkWidget *label367;
   GtkWidget *alignment72;
-  GtkWidget *smbHome;
+  GtkWidget *sambaHomePath;
   GtkWidget *alignment73;
-  GtkWidget *homeDrive;
+  GtkWidget *sambaHomeDrive;
   guint label368_key;
   GtkWidget *label368;
   guint label369_key;
   GtkWidget *label369;
-  GtkWidget *profilePath;
-  GtkWidget *scriptPath;
+  GtkWidget *sambaProfilePath;
+  GtkWidget *sambaLogonScript;
   GtkWidget *hseparator7;
+  GtkWidget *label460;
+  GtkWidget *sambaDomainNameDropdown;
+  GtkWidget *sambaDomainName;
   GtkWidget *label391;
   GtkWidget *label365;
   GtkWidget *alignment40;
@@ -2211,12 +2216,26 @@
   gtk_widget_show (vbox53);
   gtk_container_add (GTK_CONTAINER (alignment71), vbox53);
 
-  table67 = gtk_table_new (5, 2, FALSE);
+  eventbox2 = gtk_event_box_new ();
+  gtk_widget_ref (eventbox2);
+  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "eventbox2", eventbox2,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (eventbox2);
+  gtk_box_pack_start (GTK_BOX (vbox53), eventbox2, TRUE, TRUE, 0);
+
+  alignment119 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_ref (alignment119);
+  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "alignment119", alignment119,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (alignment119);
+  gtk_container_add (GTK_CONTAINER (eventbox2), alignment119);
+
+  table67 = gtk_table_new (6, 2, FALSE);
   gtk_widget_ref (table67);
   gtk_object_set_data_full (GTK_OBJECT (modifyuser), "table67", table67,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (table67);
-  gtk_box_pack_start (GTK_BOX (vbox53), table67, TRUE, TRUE, 0);
+  gtk_container_add (GTK_CONTAINER (alignment119), table67);
   gtk_table_set_row_spacings (GTK_TABLE (table67), 4);
   gtk_table_set_col_spacings (GTK_TABLE (table67), 16);
 
@@ -2227,7 +2246,7 @@
   gtk_object_set_data_full (GTK_OBJECT (modifyuser), "label366", label366,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (label366);
-  gtk_table_attach (GTK_TABLE (table67), label366, 0, 1, 1, 2,
+  gtk_table_attach (GTK_TABLE (table67), label366, 0, 1, 2, 3,
                     (GtkAttachOptions) (0),
                     (GtkAttachOptions) (0), 0, 0);
 
@@ -2238,7 +2257,7 @@
   gtk_object_set_data_full (GTK_OBJECT (modifyuser), "label367", label367,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (label367);
-  gtk_table_attach (GTK_TABLE (table67), label367, 0, 1, 0, 1,
+  gtk_table_attach (GTK_TABLE (table67), label367, 0, 1, 1, 2,
                     (GtkAttachOptions) (0),
                     (GtkAttachOptions) (0), 0, 0);
 
@@ -2247,34 +2266,34 @@
   gtk_object_set_data_full (GTK_OBJECT (modifyuser), "alignment72", alignment72,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (alignment72);
-  gtk_table_attach (GTK_TABLE (table67), alignment72, 1, 2, 0, 1,
+  gtk_table_attach (GTK_TABLE (table67), alignment72, 1, 2, 1, 2,
                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
 
-  smbHome = gtk_entry_new ();
-  gtk_widget_ref (smbHome);
-  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "smbHome", smbHome,
+  sambaHomePath = gtk_entry_new ();
+  gtk_widget_ref (sambaHomePath);
+  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "sambaHomePath", sambaHomePath,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (smbHome);
-  gtk_container_add (GTK_CONTAINER (alignment72), smbHome);
-  gtk_widget_set_usize (smbHome, 140, -2);
+  gtk_widget_show (sambaHomePath);
+  gtk_container_add (GTK_CONTAINER (alignment72), sambaHomePath);
+  gtk_widget_set_usize (sambaHomePath, 140, -2);
 
   alignment73 = gtk_alignment_new (7.45058e-09, 0.5, 0, 1);
   gtk_widget_ref (alignment73);
   gtk_object_set_data_full (GTK_OBJECT (modifyuser), "alignment73", alignment73,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (alignment73);
-  gtk_table_attach (GTK_TABLE (table67), alignment73, 1, 2, 1, 2,
+  gtk_table_attach (GTK_TABLE (table67), alignment73, 1, 2, 2, 3,
                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
 
-  homeDrive = gtk_entry_new_with_max_length (2);
-  gtk_widget_ref (homeDrive);
-  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "homeDrive", homeDrive,
+  sambaHomeDrive = gtk_entry_new_with_max_length (2);
+  gtk_widget_ref (sambaHomeDrive);
+  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "sambaHomeDrive", sambaHomeDrive,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (homeDrive);
-  gtk_container_add (GTK_CONTAINER (alignment73), homeDrive);
-  gtk_widget_set_usize (homeDrive, 29, -2);
+  gtk_widget_show (sambaHomeDrive);
+  gtk_container_add (GTK_CONTAINER (alignment73), sambaHomeDrive);
+  gtk_widget_set_usize (sambaHomeDrive, 29, -2);
 
   label368 = gtk_label_new ("");
   label368_key = gtk_label_parse_uline (GTK_LABEL (label368),
@@ -2283,7 +2302,7 @@
   gtk_object_set_data_full (GTK_OBJECT (modifyuser), "label368", label368,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (label368);
-  gtk_table_attach (GTK_TABLE (table67), label368, 0, 1, 3, 4,
+  gtk_table_attach (GTK_TABLE (table67), label368, 0, 1, 4, 5,
                     (GtkAttachOptions) (0),
                     (GtkAttachOptions) (0), 0, 0);
 
@@ -2294,39 +2313,67 @@
   gtk_object_set_data_full (GTK_OBJECT (modifyuser), "label369", label369,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (label369);
-  gtk_table_attach (GTK_TABLE (table67), label369, 0, 1, 4, 5,
+  gtk_table_attach (GTK_TABLE (table67), label369, 0, 1, 5, 6,
                     (GtkAttachOptions) (0),
                     (GtkAttachOptions) (0), 0, 0);
 
-  profilePath = gtk_entry_new ();
-  gtk_widget_ref (profilePath);
-  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "profilePath", profilePath,
+  sambaProfilePath = gtk_entry_new ();
+  gtk_widget_ref (sambaProfilePath);
+  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "sambaProfilePath", sambaProfilePath,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (profilePath);
-  gtk_table_attach (GTK_TABLE (table67), profilePath, 1, 2, 3, 4,
+  gtk_widget_show (sambaProfilePath);
+  gtk_table_attach (GTK_TABLE (table67), sambaProfilePath, 1, 2, 4, 5,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_usize (profilePath, 140, -2);
+  gtk_widget_set_usize (sambaProfilePath, 140, -2);
 
-  scriptPath = gtk_entry_new ();
-  gtk_widget_ref (scriptPath);
-  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "scriptPath", scriptPath,
+  sambaLogonScript = gtk_entry_new ();
+  gtk_widget_ref (sambaLogonScript);
+  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "sambaLogonScript", sambaLogonScript,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (scriptPath);
-  gtk_table_attach (GTK_TABLE (table67), scriptPath, 1, 2, 4, 5,
+  gtk_widget_show (sambaLogonScript);
+  gtk_table_attach (GTK_TABLE (table67), sambaLogonScript, 1, 2, 5, 6,
                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_usize (scriptPath, 140, -2);
+  gtk_widget_set_usize (sambaLogonScript, 140, -2);
 
   hseparator7 = gtk_hseparator_new ();
   gtk_widget_ref (hseparator7);
   gtk_object_set_data_full (GTK_OBJECT (modifyuser), "hseparator7", hseparator7,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (hseparator7);
-  gtk_table_attach (GTK_TABLE (table67), hseparator7, 0, 2, 2, 3,
+  gtk_table_attach (GTK_TABLE (table67), hseparator7, 0, 2, 3, 4,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
 
+  label460 = gtk_label_new (_("Windows Domain"));
+  gtk_widget_ref (label460);
+  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "label460", label460,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label460);
+  gtk_table_attach (GTK_TABLE (table67), label460, 0, 1, 0, 1,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label460), 0, 0.5);
+
+  sambaDomainNameDropdown = gtk_combo_new ();
+  gtk_widget_ref (sambaDomainNameDropdown);
+  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "sambaDomainNameDropdown", sambaDomainNameDropdown,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (sambaDomainNameDropdown);
+  gtk_table_attach (GTK_TABLE (table67), sambaDomainNameDropdown, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_widget_set_usize (sambaDomainNameDropdown, 140, -2);
+  gtk_combo_set_value_in_list (GTK_COMBO (sambaDomainNameDropdown), TRUE, TRUE);
+
+  sambaDomainName = GTK_COMBO (sambaDomainNameDropdown)->entry;
+  gtk_widget_ref (sambaDomainName);
+  gtk_object_set_data_full (GTK_OBJECT (modifyuser), "sambaDomainName", sambaDomainName,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (sambaDomainName);
+  gtk_entry_set_editable (GTK_ENTRY (sambaDomainName), FALSE);
+
   label391 = gtk_label_new (_("All paths take the UNC form; e.g. \\\\server\\home"));
   gtk_widget_ref (label391);
   gtk_object_set_data_full (GTK_OBJECT (modifyuser), "label391", label391,
@@ -2929,6 +2976,9 @@
   gtk_signal_connect (GTK_OBJECT (enablesambaobjectclass), "toggled",
                       GTK_SIGNAL_FUNC (on_enablesambaobjectclass_toggled),
                       NULL);
+  gtk_signal_connect (GTK_OBJECT (sambaDomainNameDropdown), "realize",
+                      GTK_SIGNAL_FUNC (on_sambaDomainNameDropdown_realize),
+                      NULL);
   gtk_signal_connect (GTK_OBJECT (shadowexpirecheck), "toggled",
                       GTK_SIGNAL_FUNC (on_shadowexpirecheck_toggled),
                       NULL);
@@ -2998,9 +3048,9 @@
                               label_uid_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
   gtk_widget_add_accelerator (gidnumber, "grab_focus", accel_group,
                               label21_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
-  gtk_widget_add_accelerator (profilePath, "grab_focus", accel_group,
+  gtk_widget_add_accelerator (sambaProfilePath, "grab_focus", accel_group,
                               label368_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
-  gtk_widget_add_accelerator (scriptPath, "grab_focus", accel_group,
+  gtk_widget_add_accelerator (sambaLogonScript, "grab_focus", accel_group,
                               label369_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
   gtk_widget_add_accelerator (shadowmin, "grab_focus", accel_group,
                               label285_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
@@ -4828,16 +4878,19 @@
   GtkWidget *label438;
   GtkWidget *label439;
   GtkWidget *alignment109;
-  GtkWidget *smbHome;
+  GtkWidget *sambaHomePath;
   GtkWidget *alignment110;
-  GtkWidget *homeDrive;
+  GtkWidget *sambaHomeDrive;
   guint label440_key;
   GtkWidget *label440;
   guint label441_key;
   GtkWidget *label441;
-  GtkWidget *profilePath;
-  GtkWidget *scriptPath;
+  GtkWidget *sambaProfilePath;
+  GtkWidget *sambaLogonScript;
   GtkWidget *hseparator8;
+  GtkWidget *sambaDomainNameDropdown;
+  GtkWidget *sambaDomainName;
+  GtkWidget *label461;
   GtkWidget *label442;
   GtkWidget *druidpagesecuritypolicies;
   GdkColor druidpagesecuritypolicies_bg_color = { 0, 6425, 6425, 28784 };
@@ -6063,7 +6116,7 @@
   gtk_widget_show (vbox6673);
   gtk_container_add (GTK_CONTAINER (alignment108), vbox6673);
 
-  table86 = gtk_table_new (5, 2, FALSE);
+  table86 = gtk_table_new (6, 2, FALSE);
   gtk_widget_ref (table86);
   gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "table86", table86,
                             (GtkDestroyNotify) gtk_widget_unref);
@@ -6079,7 +6132,7 @@
   gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "label438", label438,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (label438);
-  gtk_table_attach (GTK_TABLE (table86), label438, 0, 1, 1, 2,
+  gtk_table_attach (GTK_TABLE (table86), label438, 0, 1, 2, 3,
                     (GtkAttachOptions) (0),
                     (GtkAttachOptions) (0), 0, 0);
 
@@ -6090,7 +6143,7 @@
   gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "label439", label439,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (label439);
-  gtk_table_attach (GTK_TABLE (table86), label439, 0, 1, 0, 1,
+  gtk_table_attach (GTK_TABLE (table86), label439, 0, 1, 1, 2,
                     (GtkAttachOptions) (0),
                     (GtkAttachOptions) (0), 0, 0);
 
@@ -6099,34 +6152,34 @@
   gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "alignment109", alignment109,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (alignment109);
-  gtk_table_attach (GTK_TABLE (table86), alignment109, 1, 2, 0, 1,
+  gtk_table_attach (GTK_TABLE (table86), alignment109, 1, 2, 1, 2,
                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
 
-  smbHome = gtk_entry_new ();
-  gtk_widget_ref (smbHome);
-  gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "smbHome", smbHome,
+  sambaHomePath = gtk_entry_new ();
+  gtk_widget_ref (sambaHomePath);
+  gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "sambaHomePath", sambaHomePath,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (smbHome);
-  gtk_container_add (GTK_CONTAINER (alignment109), smbHome);
-  gtk_widget_set_usize (smbHome, 140, -2);
+  gtk_widget_show (sambaHomePath);
+  gtk_container_add (GTK_CONTAINER (alignment109), sambaHomePath);
+  gtk_widget_set_usize (sambaHomePath, 140, -2);
 
   alignment110 = gtk_alignment_new (7.45058e-09, 0.5, 0, 1);
   gtk_widget_ref (alignment110);
   gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "alignment110", alignment110,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (alignment110);
-  gtk_table_attach (GTK_TABLE (table86), alignment110, 1, 2, 1, 2,
+  gtk_table_attach (GTK_TABLE (table86), alignment110, 1, 2, 2, 3,
                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
 
-  homeDrive = gtk_entry_new_with_max_length (2);
-  gtk_widget_ref (homeDrive);
-  gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "homeDrive", homeDrive,
+  sambaHomeDrive = gtk_entry_new_with_max_length (2);
+  gtk_widget_ref (sambaHomeDrive);
+  gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "sambaHomeDrive", sambaHomeDrive,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (homeDrive);
-  gtk_container_add (GTK_CONTAINER (alignment110), homeDrive);
-  gtk_widget_set_usize (homeDrive, 29, -2);
+  gtk_widget_show (sambaHomeDrive);
+  gtk_container_add (GTK_CONTAINER (alignment110), sambaHomeDrive);
+  gtk_widget_set_usize (sambaHomeDrive, 29, -2);
 
   label440 = gtk_label_new ("");
   label440_key = gtk_label_parse_uline (GTK_LABEL (label440),
@@ -6135,7 +6188,7 @@
   gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "label440", label440,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (label440);
-  gtk_table_attach (GTK_TABLE (table86), label440, 0, 1, 3, 4,
+  gtk_table_attach (GTK_TABLE (table86), label440, 0, 1, 4, 5,
                     (GtkAttachOptions) (0),
                     (GtkAttachOptions) (0), 0, 0);
 
@@ -6146,39 +6199,67 @@
   gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "label441", label441,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (label441);
-  gtk_table_attach (GTK_TABLE (table86), label441, 0, 1, 4, 5,
+  gtk_table_attach (GTK_TABLE (table86), label441, 0, 1, 5, 6,
                     (GtkAttachOptions) (0),
                     (GtkAttachOptions) (0), 0, 0);
 
-  profilePath = gtk_entry_new ();
-  gtk_widget_ref (profilePath);
-  gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "profilePath", profilePath,
+  sambaProfilePath = gtk_entry_new ();
+  gtk_widget_ref (sambaProfilePath);
+  gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "sambaProfilePath", sambaProfilePath,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (profilePath);
-  gtk_table_attach (GTK_TABLE (table86), profilePath, 1, 2, 3, 4,
+  gtk_widget_show (sambaProfilePath);
+  gtk_table_attach (GTK_TABLE (table86), sambaProfilePath, 1, 2, 4, 5,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_usize (profilePath, 140, -2);
+  gtk_widget_set_usize (sambaProfilePath, 140, -2);
 
-  scriptPath = gtk_entry_new ();
-  gtk_widget_ref (scriptPath);
-  gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "scriptPath", scriptPath,
+  sambaLogonScript = gtk_entry_new ();
+  gtk_widget_ref (sambaLogonScript);
+  gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "sambaLogonScript", sambaLogonScript,
                             (GtkDestroyNotify) gtk_widget_unref);
-  gtk_widget_show (scriptPath);
-  gtk_table_attach (GTK_TABLE (table86), scriptPath, 1, 2, 4, 5,
+  gtk_widget_show (sambaLogonScript);
+  gtk_table_attach (GTK_TABLE (table86), sambaLogonScript, 1, 2, 5, 6,
                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_usize (scriptPath, 140, -2);
+  gtk_widget_set_usize (sambaLogonScript, 140, -2);
 
   hseparator8 = gtk_hseparator_new ();
   gtk_widget_ref (hseparator8);
   gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "hseparator8", hseparator8,
                             (GtkDestroyNotify) gtk_widget_unref);
   gtk_widget_show (hseparator8);
-  gtk_table_attach (GTK_TABLE (table86), hseparator8, 0, 2, 2, 3,
+  gtk_table_attach (GTK_TABLE (table86), hseparator8, 0, 2, 3, 4,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
 
+  sambaDomainNameDropdown = gtk_combo_new ();
+  gtk_widget_ref (sambaDomainNameDropdown);
+  gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "sambaDomainNameDropdown", sambaDomainNameDropdown,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (sambaDomainNameDropdown);
+  gtk_table_attach (GTK_TABLE (table86), sambaDomainNameDropdown, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_widget_set_usize (sambaDomainNameDropdown, 140, -2);
+  gtk_combo_set_value_in_list (GTK_COMBO (sambaDomainNameDropdown), TRUE, TRUE);
+
+  sambaDomainName = GTK_COMBO (sambaDomainNameDropdown)->entry;
+  gtk_widget_ref (sambaDomainName);
+  gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "sambaDomainName", sambaDomainName,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (sambaDomainName);
+  gtk_entry_set_editable (GTK_ENTRY (sambaDomainName), FALSE);
+
+  label461 = gtk_label_new (_("Windows Domain"));
+  gtk_widget_ref (label461);
+  gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "label461", label461,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label461);
+  gtk_table_attach (GTK_TABLE (table86), label461, 0, 1, 0, 1,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label461), 0, 0.5);
+
   label442 = gtk_label_new (_("All paths take the UNC form; e.g. \\\\server\\home"));
   gtk_widget_ref (label442);
   gtk_object_set_data_full (GTK_OBJECT (druid_new_user), "label442", label442,
@@ -6568,6 +6649,9 @@
   gtk_signal_connect (GTK_OBJECT (enablesambaobjectclass), "toggled",
                       GTK_SIGNAL_FUNC (on_enablesambaobjectclass_toggled),
                       NULL);
+  gtk_signal_connect (GTK_OBJECT (sambaDomainNameDropdown), "realize",
+                      GTK_SIGNAL_FUNC (on_sambaDomainNameDropdown_realize),
+                      NULL);
   gtk_signal_connect (GTK_OBJECT (shadowexpirecheck), "toggled",
                       GTK_SIGNAL_FUNC (on_shadowexpirecheck_toggled),
                       NULL);
@@ -6611,9 +6695,9 @@
                               label243_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
   gtk_widget_add_accelerator (gidnumber, "grab_focus", accel_group,
                               label241_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
-  gtk_widget_add_accelerator (profilePath, "grab_focus", accel_group,
+  gtk_widget_add_accelerator (sambaProfilePath, "grab_focus", accel_group,
                               label440_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
-  gtk_widget_add_accelerator (scriptPath, "grab_focus", accel_group,
+  gtk_widget_add_accelerator (sambaLogonScript, "grab_focus", accel_group,
                               label441_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
   gtk_widget_add_accelerator (shadowmin, "grab_focus", accel_group,
                               label429_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
diff -r -u directory_administrator-1.5.1/src/interface.h directory_administrator-1.5.1-new/src/interface.h
--- directory_administrator-1.5.1/src/interface.h	2003-06-12 14:39:32.000000000 +0200
+++ directory_administrator-1.5.1-new/src/interface.h	2004-03-11 03:39:04.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * NO EDITE ESTE ARCHIVO - esta generado por Glade.
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
  */
 
 GtkWidget* create_mainwindow (void);
Only in directory_administrator-1.5.1-new/src: interface.o
Only in directory_administrator-1.5.1-new/src: ldaptransaction.o
Only in directory_administrator-1.5.1-new/src: main.o
Only in directory_administrator-1.5.1-new/src: Makefile
Only in directory_administrator-1.5.1-new/src: md4.o
Only in directory_administrator-1.5.1-new/src: md5.o
Only in directory_administrator-1.5.1-new/src: mkntpwd.o
diff -r -u directory_administrator-1.5.1/src/modifydialogs.c directory_administrator-1.5.1-new/src/modifydialogs.c
--- directory_administrator-1.5.1/src/modifydialogs.c	2003-06-12 14:43:35.000000000 +0200
+++ directory_administrator-1.5.1-new/src/modifydialogs.c	2004-03-11 03:42:19.000000000 +0200
@@ -24,6 +24,7 @@
 #include "appfunctions.h"
 #include "modifydialogs.h"
 #include "ldaptransaction.h"
+#include "schema.h"
 
 void
 fill_modifyuser (GtkWidget * modifyuserdialog, char *userdn)
@@ -73,10 +74,10 @@
   attributes2fill = g_list_append (attributes2fill, "shadowinactive");
   attributes2fill = g_list_append (attributes2fill, "title");
   attributes2fill = g_list_append (attributes2fill, "ou");
-  attributes2fill = g_list_append (attributes2fill, "smbHome");
-  attributes2fill = g_list_append (attributes2fill, "homeDrive");
-  attributes2fill = g_list_append (attributes2fill, "profilePath");
-  attributes2fill = g_list_append (attributes2fill, "scriptPath");
+  attributes2fill = g_list_append (attributes2fill, SAMBA_HOME_PATH);
+  attributes2fill = g_list_append (attributes2fill, SAMBA_HOME_DRIVE);
+  attributes2fill = g_list_append (attributes2fill, SAMBA_PROFILE_PATH);
+  attributes2fill = g_list_append (attributes2fill, SAMBA_LOGIN_SCRIPT);
   attributes2fill =
     g_list_append (attributes2fill, "physicaldeliveryofficename");
   attributes2fill = g_list_append (attributes2fill, "l");
@@ -154,11 +155,18 @@
 				    FALSE);
     }
 
-  if (diradmin_user_has_objectclass (user, "sambaAccount"))
+  if (diradmin_user_has_objectclass (user, SAMBA_SAM_ACCOUNT))
     gtk_toggle_button_set_active ((GtkToggleButton *)
 				  lookup_widget (modifyuserdialog,
 						 "enablesambaobjectclass"),
 				  TRUE);
+
+  gtk_combo_set_popdown_strings (GTK_COMBO (lookup_widget
+					    (modifyuserdialog,
+					     "sambaDomainNameDropdown")),
+				 diradmin_user_sambadomains_from_ldap(usethisone));
+
+
   if (diradmin_user_has_objectclass (user, "inetlocalmailrecipient"))
     {
       gtk_toggle_button_set_active ((GtkToggleButton *)
@@ -874,13 +882,13 @@
 		if (strcasecmp(event->string,"w") == 0)
 			gtk_widget_grab_focus (GTK_WIDGET(lookup_widget(window,"enablesambaobjectclass")));
 		if (strcasecmp(event->string,"h") == 0)
-			gtk_widget_grab_focus (GTK_WIDGET(lookup_widget(window,"smbHome")));
+			gtk_widget_grab_focus (GTK_WIDGET(lookup_widget(window,SAMBA_HOME_PATH)));
 		if (strcasecmp(event->string,"d") == 0)
-			gtk_widget_grab_focus(GTK_WIDGET(lookup_widget(window,"homeDrive")));
+			gtk_widget_grab_focus(GTK_WIDGET(lookup_widget(window,SAMBA_HOME_DRIVE)));
 		if (strcasecmp(event->string,"t") == 0)
-			gtk_widget_grab_focus (GTK_WIDGET(lookup_widget(window,"profilePath")));
+			gtk_widget_grab_focus (GTK_WIDGET(lookup_widget(window,SAMBA_PROFILE_PATH)));
 		if (strcasecmp(event->string,"l") == 0)
-			gtk_widget_grab_focus(GTK_WIDGET(lookup_widget(window,"scriptPath")));
+			gtk_widget_grab_focus(GTK_WIDGET(lookup_widget(window,SAMBA_LOGIN_SCRIPT)));
 	}
 	if (gtk_notebook_get_current_page((GtkNotebook*)lookup_widget(window,"propertypages")) == 4) {
 		g_print("Selecting widgets from Security tab\n");
Only in directory_administrator-1.5.1-new/src: modifydialogs.o
diff -r -u directory_administrator-1.5.1/src/newdruids.c directory_administrator-1.5.1-new/src/newdruids.c
--- directory_administrator-1.5.1/src/newdruids.c	2003-06-12 14:35:15.000000000 +0200
+++ directory_administrator-1.5.1-new/src/newdruids.c	2004-03-11 03:45:09.000000000 +0200
@@ -28,6 +28,7 @@
 #include "ldaptransaction.h"
 #include "dir_entry.h"
 #include "charset.h"
+#include "schema.h"
 
 gboolean
 newgroup_commit (GnomeDruidPage * gnomedruidpage)
@@ -449,13 +450,13 @@
 			gtk_widget_grab_focus (GTK_WIDGET(lookup_widget(window,"enablesambaobjectclass")));
 //			gtk_toggle_button_set_active((GtkToggleButton*)lookup_widget(window,"enablesambaobjectclass"),TRUE);
 		if (strcasecmp(event->string,"h") == 0)
-			gtk_widget_grab_focus (GTK_WIDGET(lookup_widget(window,"smbHome")));
+			gtk_widget_grab_focus (GTK_WIDGET(lookup_widget(window,SAMBA_HOME_PATH)));
 		if (strcasecmp(event->string,"d") == 0)
-			gtk_widget_grab_focus(GTK_WIDGET(lookup_widget(window,"homeDrive")));
+			gtk_widget_grab_focus(GTK_WIDGET(lookup_widget(window,SAMBA_HOME_DRIVE)));
 		if (strcasecmp(event->string,"t") == 0)
-			gtk_widget_grab_focus (GTK_WIDGET(lookup_widget(window,"profilePath")));
+			gtk_widget_grab_focus (GTK_WIDGET(lookup_widget(window,SAMBA_PROFILE_PATH)));
 		if (strcasecmp(event->string,"l") == 0)
-			gtk_widget_grab_focus(GTK_WIDGET(lookup_widget(window,"scriptPath")));
+			gtk_widget_grab_focus(GTK_WIDGET(lookup_widget(window,SAMBA_LOGIN_SCRIPT)));
 	}
 	if (druid->current == (GnomeDruidPage*)lookup_widget(window,"druidpagesecuritypolicies")) {
 		g_print("Selecting widgets from Security tab\n");
@@ -539,10 +540,10 @@
 			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,"mailroutingaddress")) ||
 			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,"mailhost")) ||
 			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,"homedirectory")) ||
-			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,"smbHome")) ||
-			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,"homeDrive")) ||
-			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,"profilePath")) ||
-			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,"scriptPath")) ||
+			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,SAMBA_HOME_PATH)) ||
+			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,SAMBA_HOME_DRIVE)) ||
+			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,SAMBA_PROFILE_PATH)) ||
+			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,SAMBA_LOGIN_SCRIPT)) ||
 			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,"shadowmin")) ||
 			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,"shadowmax")) ||
 			GTK_WIDGET_HAS_FOCUS(lookup_widget((GtkWidget*)druid,"shadowwarning")) ||
Only in directory_administrator-1.5.1-new/src: newdruids.o
Only in directory_administrator-1.5.1-new/src: pairs.o
Only in directory_administrator-1.5.1-new/src: prefsdialog.o
Only in directory_administrator-1.5.1-new/src: prefs.o
Only in directory_administrator-1.5.1-new/src: profile.o
Only in directory_administrator-1.5.1-new/src: schema.h
Only in directory_administrator-1.5.1-new/src: smbdes.o
diff -r -u directory_administrator-1.5.1/src/support.c directory_administrator-1.5.1-new/src/support.c
--- directory_administrator-1.5.1/src/support.c	2003-06-12 14:39:32.000000000 +0200
+++ directory_administrator-1.5.1-new/src/support.c	2004-03-11 03:39:04.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * NO EDITE ESTE ARCHIVO - esta generado por Glade.
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
  */
 
 #ifdef HAVE_CONFIG_H
diff -r -u directory_administrator-1.5.1/src/support.h directory_administrator-1.5.1-new/src/support.h
--- directory_administrator-1.5.1/src/support.h	2003-06-12 14:39:32.000000000 +0200
+++ directory_administrator-1.5.1-new/src/support.h	2004-03-11 03:39:04.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * NO EDITE ESTE ARCHIVO - esta generado por Glade.
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
  */
 
 #include <gnome.h>
Only in directory_administrator-1.5.1-new/src: support.o
Only in directory_administrator-1.5.1-new/src: usergrouplists.o
diff -r -u directory_administrator-1.5.1/src/users.c directory_administrator-1.5.1-new/src/users.c
--- directory_administrator-1.5.1/src/users.c	2003-06-12 13:20:29.000000000 +0200
+++ directory_administrator-1.5.1-new/src/users.c	2004-03-11 04:15:57.000000000 +0200
@@ -19,6 +19,7 @@
 #include <glib.h>
 #include <gnome.h>
 #include "appsupport.h"
+#include "appfunctions.h"
 #include "appglobals.h"
 #include "groups.h"
 #include "users.h"
@@ -34,6 +35,7 @@
 #include <sys/time.h>
 #include <unistd.h>
 #include "md5.h"
+#include "schema.h"
 
 //standard attributes to check on creation/modification
 gchar *attrs2chk[] = { "uid", "uidnumber", "gidnumber", "givenname",
@@ -45,8 +47,8 @@
   "shadowexpire", "title", "physicaldeliveryofficename",
   "ou", "l",
   "telephonenumber", "facsimiletelephonenumber", "o", "homephone",
-  "mobile", "smbHome", "homeDrive", "profilePath", "scriptPath", "lmPassword",
-  "ntPassword", "rid", "objectclass", "host","employeeNumber",
+  "mobile", SAMBA_DOMAIN_NAME, SAMBA_HOME_PATH, SAMBA_HOME_DRIVE, SAMBA_PROFILE_PATH, SAMBA_LOGIN_SCRIPT, SAMBA_LM_PASSWORD,
+  SAMBA_NT_PASSWORD, SAMBA_SID, "objectclass", "host","employeeNumber",
   NULL
 };
 
@@ -57,8 +59,8 @@
   "shadowinactive", "shadowexpire", NULL
 };
 gchar *sambalist[] = {
-  "smbHome", "homeDrive", "profilePath", "scriptPath", "lmPassword",
-  "ntPassword", "rid", NULL
+  SAMBA_HOME_PATH, SAMBA_HOME_DRIVE, SAMBA_PROFILE_PATH, SAMBA_LOGIN_SCRIPT, SAMBA_LM_PASSWORD,
+  SAMBA_NT_PASSWORD, SAMBA_SID, NULL
 };
 gchar *maillist[] = {
   "maillocaladdress", "mailroutingaddress", "mailhost", NULL
@@ -74,7 +76,7 @@
 
 gchar *handled_objectclasses[] = {
 /*"person",*/"organizationalPerson","inetOrgPerson","account","posixAccount",
-"shadowAccount","sambaAccount","inetLocalMailRecipient","top", NULL
+"shadowAccount",SAMBA_SAM_ACCOUNT,"inetLocalMailRecipient","top", NULL
 };
 
 
@@ -245,7 +247,7 @@
   for (i = 0; sambalist[i] != NULL; i++)
     if (g_strcasecmp (sambalist[i], attr) == 0)
       {
-	diradmin_user_add_objectclass (conn, "sambaAccount");
+	diradmin_user_add_objectclass (conn, SAMBA_SAM_ACCOUNT);
       }
   for (i = 0; maillist[i] != NULL; i++)
     if (g_strcasecmp (maillist[i], attr) == 0)
@@ -293,7 +295,7 @@
   if (isneeded == FALSE)
     {
 //      g_print("\nTighten objectclasses: removing samba classes");
-      diradmin_user_remove_objectclass (u, "sambaAccount");
+      diradmin_user_remove_objectclass (u, SAMBA_SAM_ACCOUNT);
     }
   isneeded = FALSE;
   for (i = 0; personlist[i] != NULL; i++)
@@ -351,17 +353,17 @@
       snprintf (buf2, sizeof buf2, "%s", to);
     }
 
-  if (diradmin_user_has_objectclass(conn,"sambaaccount"))
+  if (diradmin_user_has_objectclass(conn, SAMBA_SAM_ACCOUNT))
   {
     char hash[17], hexstr[33];
 
     mklmhash(to, hash);
     to_hexstr(hash, hexstr);
-    diradmin_user_set_attribute (conn, "lmPassword", hexstr);
+    diradmin_user_set_attribute (conn, SAMBA_LM_PASSWORD, hexstr);
 
     mknthash(to, hash);
     to_hexstr(hash, hexstr);
-    diradmin_user_set_attribute (conn, "ntPassword", hexstr);
+    diradmin_user_set_attribute (conn, SAMBA_NT_PASSWORD, hexstr);
   }
   diradmin_user_set_attribute (conn, "userPassword", buf);
   if (preferences.rfc2307bis == TRUE)
@@ -502,6 +504,188 @@
 }
 
 
+/**
+ * Get the list of samba domains from the ldap server.
+ *
+ * This function queries the LDAP server for all entries
+ * containing the sambaDomain objectclass, and returns
+ * a list of sambaDomainName values.
+ */
+GList *
+diradmin_user_sambadomains_from_ldap (connection_profile * usethisone)
+{
+  //conn should already be connected, or else undefined behaviour!!!
+
+  int ldap_errors;
+
+  GList *sambaDomains = NULL;
+
+  LDAP *h;
+  LDAPMessage *searchresults = NULL;
+  LDAPMessage *entry = NULL;
+
+  char **value_collection = NULL;
+
+  gchar *attribute;
+  BerElement *attributehandler;
+  gchar *attributetoreturn[2];
+  attributetoreturn[0] = SAMBA_DOMAIN_NAME;
+  attributetoreturn[1] = NULL;
+
+  g_print ("\nFetching samba domains from directory with base %s\n", usethisone->treeroot);
+
+  //check 4 connection
+  h = connection_profile_get_ldap_handler (usethisone);
+  g_assert (h);
+
+  //look data up
+  ldap_errors =
+    ldap_search_s (h, usethisone->treeroot, LDAP_SCOPE_SUBTREE, "(objectclass=" SAMBA_DOMAIN ")", attributetoreturn, 0,
+		   &searchresults);
+
+  if (ldap_errors)
+    {
+      //any error?
+      g_print ("LDAP error while searching for samba domains");
+      g_print (": ");
+      g_print (ldap_err2string (ldap_errors));
+      g_print ("\n");
+      //ldap_msgfree (searchresults);
+	  if (ldap_errors ==  LDAP_SERVER_DOWN) {
+		connection_profile_invalidate(usethisone);
+	  }
+	  return NULL;
+    }
+  else
+    {
+      // loop through any entries found
+      entry = ldap_first_entry (h, searchresults);
+      while (entry) {
+        attribute = ldap_first_attribute (h, entry, &attributehandler);
+        value_collection = ldap_get_values (h, entry, attribute);
+	g_assert (value_collection);
+        sambaDomains = g_list_append (sambaDomains, g_strdup (value_collection[0]));
+        g_print ("diradmin_user_sambadomains_from_ldap found samba domain: %s\n", value_collection[0]);
+        ldap_value_free (value_collection);
+	entry = ldap_next_entry (h, searchresults);
+      }
+
+      ldap_msgfree (searchresults);
+    }
+
+  return (sambaDomains);
+}
+
+
+/**
+ * Calculate the sambaSID attribute
+ *
+ * This function queries the LDAP server for the given
+ * sambaDomain objectclass specified by the sambaDomainName
+ * provided.
+ *
+ * The given uid is added to the value of sambaAlgorithmicRidBase,
+ * which in turn is tacked onto the end of sambaSID, giving the
+ * resulting value for sambaSID for this object.
+ */
+gchar *
+diradmin_user_get_sambasid_from_ldap (connection_profile * usethisone, gchar *sambaDomain, gchar *uidnumber)
+{
+  //conn should already be connected, or else undefined behaviour!!!
+
+  int ldap_errors;
+
+  LDAP *h;
+  LDAPMessage *searchresults = NULL;
+  LDAPMessage *entry = NULL;
+
+  char **value_collection = NULL;
+
+  gchar *attribute;
+  gchar *filter;
+  gchar *sambaAlgorithmicRidBase = NULL;
+  gchar *sambaSID = NULL;
+  gchar *userSambaSID = NULL;
+  char buffer[11];
+  BerElement *attributehandler;
+  gchar *attributetoreturn[3];
+  attributetoreturn[0] = SAMBA_ALGORITHMIC_RID_BASE;
+  attributetoreturn[1] = SAMBA_SID;
+  attributetoreturn[2] = NULL;
+
+  filter = g_strconcat ("(&(objectclass=" SAMBA_DOMAIN ")(" SAMBA_DOMAIN_NAME "=", sambaDomain, "))", NULL);
+  g_print ("\nFetching sambaDomain %s from directory with base %s using filter:\n%s\n\n", sambaDomain, usethisone->treeroot, filter);
+
+  //check 4 connection
+  h = connection_profile_get_ldap_handler (usethisone);
+  g_assert (h);
+
+  //look data up
+  ldap_errors =
+    ldap_search_s (h, usethisone->treeroot, LDAP_SCOPE_SUBTREE, filter, attributetoreturn, 0,
+		   &searchresults);
+
+  if (ldap_errors)
+    {
+      //any error?
+      g_print ("LDAP error while searching for sambaDomain");
+      g_print (": ");
+      g_print (ldap_err2string (ldap_errors));
+      g_print ("\n");
+      //ldap_msgfree (searchresults);
+	  if (ldap_errors ==  LDAP_SERVER_DOWN) {
+		connection_profile_invalidate(usethisone);
+	  }
+	  return NULL;
+    }
+  else
+    {
+      // loop through any entries found, extract attributes
+      entry = ldap_first_entry (h, searchresults);
+      while (entry) {
+        attribute = ldap_first_attribute (h, entry, &attributehandler);
+	while (attribute) {
+          value_collection = ldap_get_values (h, entry, attribute);
+          g_assert (value_collection);
+          g_print ("diradmin_user_get_sambasid_from_ldap processing: %s\n", attribute);
+          if (g_strcasecmp (attribute, SAMBA_ALGORITHMIC_RID_BASE) == 0) {
+            sambaAlgorithmicRidBase = g_strdup(value_collection[0]);
+            g_print ("diradmin_user_get_sambasid_from_ldap found sambaAlgorithmicRidBase: %s\n", sambaAlgorithmicRidBase);
+          }
+          else if (g_strcasecmp (attribute, SAMBA_SID) == 0) {
+            sambaSID = g_strdup(value_collection[0]);
+            g_print ("diradmin_user_get_sambasid_from_ldap found sambaSID: %s\n", sambaSID);
+          }
+          ldap_value_free (value_collection);
+	  attribute = ldap_next_attribute (h, entry, attributehandler);
+	}
+	entry = ldap_next_entry (h, searchresults);
+      }
+
+      ldap_msgfree (searchresults);
+    }
+
+  // sanity check
+  if (!sambaSID) {
+    g_print ("diradmin_user_get_sambasid_from_ldap found sambaDomain %s, but this object had no sambaSID attribute associated with it.\n", sambaDomain);
+    return NULL;
+  }
+  if (!sambaAlgorithmicRidBase) {
+    g_print ("diradmin_user_get_sambasid_from_ldap found sambaDomain %s, but this object had no sambaAlgorithmicRidBase attribute associated with it.\n", sambaDomain);
+    return NULL;
+  }
+
+  // create sambaSID of user or group
+  sprintf(buffer, "%d", 2*atoi(uidnumber) + atoi(sambaAlgorithmicRidBase));
+  userSambaSID = g_strconcat(sambaSID, "-", buffer, NULL);
+  g_free(sambaSID);
+  g_free(sambaAlgorithmicRidBase);
+  g_print ("diradmin_user_get_sambasid_from_ldap returned %s\n", userSambaSID);
+  return userSambaSID;
+}
+
+
+
 GList *
 diradmin_user_get_allowedservers (diradmin_user * conn)
 {
@@ -836,7 +1020,7 @@
 	{
 		oldattr = diradmin_user_get_attribute (oldone, attrs2chk[acnt]);
 		newattr = diradmin_user_get_attribute (newone, attrs2chk[acnt]);
-		ispassword = g_strcasecmp  (attrs2chk[acnt], "userPassword") == 0  ||  g_strcasecmp  (attrs2chk[acnt], "authPassword") == 0 ||  g_strcasecmp (attrs2chk[acnt], "ntPassword") == 0 || g_strcasecmp (attrs2chk[acnt], "lmPassword") == 0;
+		ispassword = g_strcasecmp  (attrs2chk[acnt], "userPassword") == 0  ||  g_strcasecmp  (attrs2chk[acnt], "authPassword") == 0 ||  g_strcasecmp (attrs2chk[acnt], SAMBA_NT_PASSWORD) == 0 || g_strcasecmp (attrs2chk[acnt], SAMBA_LM_PASSWORD) == 0;
 
 		// if any attribute isn't empty
 		if (oldattr || newattr) {
@@ -911,12 +1095,14 @@
   gchar *shadowmin = NULL;
   gchar *shadowmax = NULL;
   gchar *shadowwarning = NULL;
-  gchar *smbHome = NULL;
-  gchar *homeDrive = NULL;
-  gchar *profilePath = NULL;
-  gchar *scriptPath = NULL;
-  gchar *lmPassword = NULL;
-  gchar *ntPassword = NULL;
+  gchar *sambaSID;
+  gchar *sambaDomainName;
+  gchar *sambaHomePath = NULL;
+  gchar *sambaHomeDrive = NULL;
+  gchar *sambaProfilePath = NULL;
+  gchar *sambaLoginScript = NULL;
+  gchar *sambaLMPassword = NULL;
+  gchar *sambaNTPassword = NULL;
   gchar *shadowinactive = NULL;
 
   char buf[32];
@@ -957,10 +1143,10 @@
     gtk_entry_get_text (GTK_ENTRY
 			(lookup_widget (dialogbox, "userpassword")));
 
-  lmPassword =
+  sambaLMPassword =
     gtk_entry_get_text (GTK_ENTRY
 			(lookup_widget (dialogbox, "userpassword")));
-  ntPassword =
+  sambaNTPassword =
     gtk_entry_get_text (GTK_ENTRY
 			(lookup_widget (dialogbox, "userpassword")));
   gecos = gtk_entry_get_text (GTK_ENTRY (lookup_widget (dialogbox, "cn")));
@@ -1096,26 +1282,34 @@
   if (GTK_TOGGLE_BUTTON
       (lookup_widget (dialogbox, "enablesambaobjectclass"))->active)
     {
-      char rid[11];
 
-      smbHome =
-	gtk_entry_get_text (GTK_ENTRY (lookup_widget (dialogbox, "smbHome")));
-      homeDrive =
+      sambaDomainName =
+        gtk_entry_get_text (GTK_ENTRY (lookup_widget (dialogbox, "sambaDomainName")));
+
+      sambaHomePath =
+	gtk_entry_get_text (GTK_ENTRY (lookup_widget (dialogbox, "sambaHomePath")));
+
+      sambaHomeDrive =
 	gtk_entry_get_text (GTK_ENTRY
-			    (lookup_widget (dialogbox, "homeDrive")));
-      profilePath =
+			    (lookup_widget (dialogbox, "sambaHomeDrive")));
+      sambaProfilePath =
 	gtk_entry_get_text (GTK_ENTRY
-			    (lookup_widget (dialogbox, "profilePath")));
-      scriptPath =
+			    (lookup_widget (dialogbox, "sambaProfilePath")));
+      sambaLoginScript =
 	gtk_entry_get_text (GTK_ENTRY
-			    (lookup_widget (dialogbox, "scriptPath")));
-      diradmin_user_set_attribute (newuser, "smbHome", smbHome);
-      diradmin_user_set_attribute (newuser, "homeDrive", homeDrive);
-      diradmin_user_set_attribute (newuser, "profilePath", profilePath);
-      diradmin_user_set_attribute (newuser, "scriptPath", scriptPath);
+			    (lookup_widget (dialogbox, "sambaLogonScript")));
 
-      sprintf(rid, "%d", 2*atoi(uidnumber) + 1000);
-      diradmin_user_set_attribute (newuser, "rid", rid);
+      sambaSID = diradmin_user_get_sambasid_from_ldap(conn, sambaDomainName, uidnumber);
+      if (!sambaSID) {
+        gtk_widget_show (create_messagebox_with_message ("No valid Windows domains have been found. A user cannot have Windows domain support enabled when this is the case."));
+      } else {
+        diradmin_user_set_attribute (newuser, SAMBA_SID, sambaSID);
+        diradmin_user_set_attribute (newuser, SAMBA_DOMAIN_NAME, sambaDomainName);
+        diradmin_user_set_attribute (newuser, SAMBA_HOME_PATH, sambaHomePath);
+        diradmin_user_set_attribute (newuser, SAMBA_HOME_DRIVE, sambaHomeDrive);
+        diradmin_user_set_attribute (newuser, SAMBA_PROFILE_PATH, sambaProfilePath);
+        diradmin_user_set_attribute (newuser, SAMBA_LOGIN_SCRIPT, sambaLoginScript);
+      }
     }
 
   if (strlen (userpassword) > 0)
Only in directory_administrator-1.5.1-new/src: users.o
Only in directory_administrator-1.5.1-new: stamp-h1
schema.h (text/plain, 1.8 KB)
/* Copyright (C) 2004 Graham Leggett (minfrin)
   This file is part of Directory administrator.

   Directory administrator is free software; you can redistribute it 
   and/or modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2.1 of
   the License, or (at your option) any later version.

   Directory administrator is distributed in the hope that it will be 
   useful, but WITHOUT ANY WARRANTY; without even the implied warranty
   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License along
   with Directory administrator; if not, send e-mail to [email protected] 
*/


#ifndef __schema
#define __schema 1

/* support for Samba v3.0 */
#define SAMBA_LM_PASSWORD "sambaLMPassword"
#define SAMBA_NT_PASSWORD "sambaNTPassword"
#define SAMBA_ACCT_FLAGS "sambaAcctFlags"
#define SAMBA_PWD_LAST_SET "sambaPwdLastSet"
#define SAMBA_LOGON_TIME "sambaLogonTime"
#define SAMBA_LOGOFF_TIME "sambaLogoffTime"
#define SAMBA_KICKOFF_TIME "sambaKickoffTime"
#define SAMBA_PWDCANCHANGE "sambaPwdCanChange"
#define SAMBA_PWDMUSTCHANGE "sambaPwdMustChange"
#define SAMBA_HOME_DRIVE "sambaHomeDrive"
#define SAMBA_LOGIN_SCRIPT "sambaLogonScript"
#define SAMBA_PROFILE_PATH "sambaProfilePath"
#define SAMBA_USER_WORKSTATIONS "sambaUserWorkstations"
#define SAMBA_HOME_PATH "sambaHomePath"
#define SAMBA_DOMAIN "sambaDomain"
#define SAMBA_DOMAIN_NAME "sambaDomainName"
#define SAMBA_MUNGED_DIAL "sambaMungedDial"
#define SAMBA_SID "sambaSID"
#define SAMBA_ALGORITHMIC_RID_BASE "sambaAlgorithmicRidBase"
#define SAMBA_PRIMARY_GROUP_SID "sambaPrimaryGroupSID"
#define SAMBA_SAM_ACCOUNT "sambaSamAccount"

#endif