1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE appendix PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
4 <appendix id="appendix">
5 <title>Appendix: A Collection of Useful Tid-bits</title>
8 <primary>material</primary>
9 </indexterm><indexterm>
10 <primary>domain</primary>
11 <secondary>joining</secondary>
13 Information presented here is considered to be either basic or well-known material that is informative
14 yet helpful. Over the years, I have observed an interesting behavior. There is an expectation that
15 the process for joining a Windows client to a Samba-controlled Windows Domain may somehow involve steps
16 different from doing so with Windows NT4 or a Windows ADS Domain. Be assured that the steps are identical,
17 as shown in the example given below.
21 <title>Joining a Domain: Windows 200x/XP Professional</title>
24 <primary>joining a domain</primary>
26 Microsoft Windows NT/200x/XP Professional platforms can participate in Domain Security.
27 This section steps through the process for making a Windows 200x/XP Professional machine a
28 member of a Domain Security environment. It should be noted that this process is identical
29 when joining a domain that is controlled by Windows NT4/200x as well as a Samba PDC.
34 Click <guimenu>Start</guimenu>.
38 Right-click <guimenu>My Computer</guimenu>, and then select <guimenuitem>Properties</guimenuitem>.
42 The opening panel is the same one that can be reached by clicking <guimenu>System</guimenu> on the Control Panel.
43 See <link linkend="wxpp001"></link>.
44 <image id="wxpp001"><imagefile>wxpp001</imagefile><imagedescription>The General Panel.</imagedescription></image>
48 Click the <guimenu>Computer Name</guimenu> tab.
49 This panel shows the <guimenuitem>Computer Description</guimenuitem>, the <guimenuitem>Full computer name</guimenuitem>,
50 and the <guimenuitem>Workgroup</guimenuitem> or <guimenuitem>Domain name</guimenuitem>.
54 Clicking the <guimenu>Network ID</guimenu> button launches the configuration wizard. Do not use this with
55 Samba-3. If you wish to change the computer name, or join or leave the domain, click the <guimenu>Change</guimenu> button.
56 See <link linkend="wxpp004"></link>.
57 <image id="wxpp004"><imagefile>wxpp004</imagefile><imagedescription>The Computer Name Panel.</imagedescription></image>
61 Click on <guimenu>Change</guimenu>. This panel shows that our example machine (TEMPTATION) is in a workgroup called WORKGROUP.
62 We join the domain called MIDEARTH. See <link linkend="wxpp006"></link>.
63 <image id="wxpp006"><imagefile>wxpp006</imagefile><imagedescription>The Computer Name Changes Panel.</imagedescription></image>
67 Enter the name <guimenu>MIDEARTH</guimenu> in the field below the Domain radio button.
71 This panel shows that our example machine (TEMPTATION) is set to join the domain called MIDEARTH. See <link linkend="wxpp007"></link>.
72 <image id="wxpp007"><imagefile>wxpp007</imagefile><imagedescription>The Computer Name Changes Panel &smbmdash; Domain MIDEARTH.</imagedescription></image>
76 Now click the <guimenu>OK</guimenu> button. A dialog box should appear to allow you to provide the credentials (username and password)
77 of a Domain administrative account that has the rights to add machines to the Domain.
81 Enter the name <quote>root</quote> and the root password from your Samba-3 server. See <link linkend="wxpp008"></link>.
82 <image id="wxpp008"><imagefile>wxpp008</imagefile><imagedescription>Computer Name Changes &smbmdash; User name and Password Panel.</imagedescription></image>
86 Click <guimenu>OK</guimenu>.
90 The <quote>Welcome to the MIDEARTH domain</quote> dialog box should appear. At this point, the machine must be rebooted.
91 Joining the domain is now complete.
97 <primary>Active Directory</primary>
98 </indexterm><indexterm>
99 <primary>DNS</primary>
101 The screen capture shown in <link linkend="wxpp007"/> has a button labeled <guimenu>More...</guimenu>. This button opens a
102 panel in which you can set (or change) the Primary DNS suffix of the computer. This is a parameter that mainly affects members
103 of Microsoft Active Directory. Active Directory is heavily oriented around the DNS name space.
107 <primary>Netlogon</primary>
108 </indexterm><indexterm>
109 <primary>DNS</primary><secondary>dynamic</secondary>
111 Where NetBIOS technology uses WINS as well as UDP broadcast as key mechanisms for name resolution, Active Directory servers
112 register their services with the Microsoft Dynamic DNS server. Windows clients must be able to query the correct DNS server
113 to find the services (like which machines are Domain Controllers or which machines have the Netlogon service running).
117 <primary>DNS</primary>
118 <secondary>suffix</secondary>
120 The default setting of the Primary DNS suffix is the Active Directory domain name. When you change the Primary DNS suffix,
121 this does not affect Domain Membership, but it can break network browsing and the ability to resolve your computer name to
126 The Primary DNS suffix parameter principally affects MS Windows clients that are members of an Active Directory domain.
127 Where the client is a member of a Samba Domain, it is preferable to leave this field blank.
131 <primary>Group Policy</primary>
133 According to Microsoft documentation, <quote>If this computer belongs to a group with <constant>Group Policy</constant>
134 enabled on <command>Primary DNS suffice of this computer</command>, the string specified in the Group Policy is used
135 as the primary DNS suffix and you might need to restart your computer to view the correct setting. The local setting is
136 used only if Group Policy is disabled or unspecified.</quote>
142 <title>Samba System File Location</title>
145 <primary>default installation</primary>
146 </indexterm><indexterm>
147 <primary>/usr/local/samba</primary>
148 </indexterm><indexterm>
149 <primary>/usr/local</primary>
151 One of the frustrations expressed by subscribers to the Samba mailing lists revolves around the choice of where the default Samba Team
152 build and installation process locates its Samba files. The location, chosen in the early 1990s, for the default installation is
153 in the <filename>/usr/local/samba</filename> directory. This is a perfectly reasonable location, particularly given all the other
154 Open Source software that installs into the <filename>/usr/local</filename> subdirectories.
158 Several UNIX vendors, and Linux vendors in particular, elected to locate the Samba files in a location other than the Samba Team
163 <primary>Free Standards Grou</primary>
165 </indexterm><indexterm>
166 <primary>FSG</primary>
167 </indexterm><indexterm>
168 <primary>Linux Standards Base</primary>
170 </indexterm><indexterm>
171 <primary>LSB</primary>
172 </indexterm><indexterm>
173 <primary>File Hierarchy System</primary>
175 </indexterm><indexterm>
176 <primary>FHS</primary>
177 </indexterm><indexterm>
178 <primary>file locations</primary>
179 </indexterm><indexterm>
180 <primary>/etc/samba</primary>
181 </indexterm><indexterm>
182 <primary>/usr/sbin</primary>
183 </indexterm><indexterm>
184 <primary>/usr/bin</primary>
185 </indexterm><indexterm>
186 <primary>/usr/share</primary>
187 </indexterm><indexterm>
188 <primary>/usr/share/swat</primary>
189 </indexterm><indexterm>
190 <primary>/usr/lib/samba</primary>
191 </indexterm><indexterm>
192 <primary>/usr/share/samba/swat</primary>
193 </indexterm><indexterm>
194 <primary>SWAT</primary>
195 </indexterm><indexterm>
196 <primary>VFS modules</primary>
198 Linux vendors, working in conjunction with the Free Standards Group (FSG), Linux Standards Base (LSB), and File Hierarchy
199 System (FHS), have elected to locate the configuration files under the <filename>/etc/samba</filename> directory, common binary
200 files (those used by users) in the <filename>/usr/bin</filename> directory, and the administrative files (daemons) in the
201 <filename>/usr/sbin</filename> directory. Support files for the Samba Web Admin Tool (SWAT) are located under the
202 <filename>/usr/share</filename> directory, either in <filename>/usr/share/samba/swat</filename> or in
203 <filename>/usr/share/swat</filename>. There are additional support files for <command>smbd</command> in the
204 <filename>/usr/lib/samba</filename> directory tree. The files located there include the dynamically loadable modules for the
205 passdb backend as well as for the VFS modules.
209 <primary>/var/lib/samba</primary>
210 </indexterm><indexterm>
211 <primary>/var/log/samba</primary>
212 </indexterm><indexterm>
213 <primary>run-time control files</primary>
215 Samba creates run-time control files and generates log files. The run-time control files (tdb and dat files) are stored in
216 the <filename>/var/lib/samba</filename> directory. Log files are created in <filename>/var/log/samba.</filename>
220 When Samba is built and installed using the default Samba Team process, all files are located under the
221 <filename>/usr/local/samba</filename> directory tree. This makes it simple to find the files that Samba owns.
225 <primary>smbd</primary>
226 <secondary>location of files</secondary>
228 One way to find the Samba files that are installed on your UNIX/Linux system is to search for the location
229 of all files called <command>smbd</command>. Here is an example:
231 &rootprompt; find / -name smbd -print
233 You can find the location of the configuration files by running:
235 &rootprompt; /path-to-binary-file/smbd -b | more
240 SWATDIR: /usr/share/samba/swat
241 CONFIGFILE: /etc/samba/smb.conf
242 LOGFILEBASE: /var/log/samba
243 LMHOSTSFILE: /etc/samba/lmhosts
244 LIBDIR: /usr/lib/samba
246 LOCKDIR: /var/lib/samba
247 PIDDIR: /var/run/samba
248 SMB_PASSWD_FILE: /etc/samba/smbpasswd
249 PRIVATE_DIR: /etc/samba
252 If you wish to locate the Samba version, just run:
254 &rootprompt; /path-to-binary-file/smbd -V
260 Many people have been caught by installation of Samba using the default Samba Team process when it was already installed
261 by the platform vendor's method. If your platform uses RPM format packages, you can check to see if Samba is installed by
262 executing:<indexterm>
263 <primary>rpm</primary>
266 &rootprompt; rpm -qa | grep samba
269 samba3-winbind-3.0.12-1
271 samba3-python-3.0.12-1
272 samba3-utils-3.0.12-1
274 samba3-client-3.0.12-1
275 samba3-cifsmount-3.0.12-1
277 <primary>package names</primary>
279 The package names, of course, vary according to how the vendor, or the binary package builder, prepared them.
285 <title>Starting Samba</title>
288 <primary>daemon</primary>
290 Samba essentially consists of two or three daemons. A daemon is a UNIX application that runs in the background and provides services.
291 An example of a service is the Apache Web server for which the daemon is called <command>httpd</command>. In the case of Samba, there
292 are three daemons, two of which are needed as a minimum.
296 The Samba server is made up of the following daemons:
299 <example id="ch12SL">
300 <title>A Useful Samba Control Script for SuSE Linux</title>
304 # Script to start/stop samba
305 # Locate this in /sbin as a file called 'samba'
309 if [ z$1 == 'z' ]; then
310 echo $0 - No arguments given; must be start or stop.
314 if [ $1 == 'start' ]; then
320 if [ $1 == 'stop' ]; then
325 if [ $1 == 'restart' ]; then
339 <varlistentry><term>nmbd</term>
341 <indexterm><primary>smbd</primary></indexterm>
342 <indexterm><primary>starting samba</primary><secondary>smbd</secondary></indexterm>
343 This daemon handles all name registration and resolution requests. It is the primary vehicle involved
344 in network browsing. It handles all UDP-based protocols. The <command>nmbd</command> daemon should
345 be the first command started as part of the Samba startup process.
349 <varlistentry><term>smbd</term>
351 <indexterm><primary>nmbd</primary></indexterm>
352 <indexterm><primary>starting samba</primary><secondary>nmbd</secondary></indexterm>
353 This daemon handles all TCP/IP-based connection services for file- and print-based operations. It also
354 manages local authentication. It should be started immediately following the startup of <command>nmbd</command>.
358 <varlistentry><term>winbindd</term>
360 <indexterm><primary>winbindd</primary></indexterm>
361 <indexterm><primary>starting samba</primary><secondary>winbindd</secondary></indexterm>
362 This daemon should be started when Samba is a member of a Windows NT4 or ADS Domain. IT is also needed when
363 Samba has trust relationships with another Domain. The <command>winbindd</command> daemon will check the
364 &smb.conf; file for the presence of the <parameter>idmap uid</parameter> and <parameter>idmap gid</parameter>
365 parameters. If they are not found, <command>winbindd</command> bails out and refuses to start.
371 When Samba has been packaged by an operating system vendor, the startup process is typically a custom feature of its
372 integration into the platform as a whole. Please refer to your operating system platform administration manuals for
373 specific information pertaining to correct management of Samba startup.
376 <example id="ch12RHscript">
380 # chkconfig: 345 81 35
381 # description: Starts and stops the Samba smbd and nmbd daemons \
382 # used to provide SMB network services.
384 # Source function library.
385 . /etc/rc.d/init.d/functions
386 # Source networking configuration.
387 . /etc/sysconfig/network
388 # Check that networking is up.
389 [ ${NETWORKING} = "no" ] && exit 0
390 CONFIG=/etc/samba/smb.conf
391 # Check that smb.conf exists.
392 [ -f $CONFIG ] || exit 0
394 # See how we were called.
397 echo -n "Starting SMB services: "
398 daemon smbd -D; daemon nmbd -D; echo;
399 touch /var/lock/subsys/smb
402 echo -n "Shutting down SMB services: "
403 smbdpids=`ps guax | grep smbd | grep -v grep | awk '{print $2}'`
404 for pid in $smbdpids; do
407 killproc nmbd -TERM; rm -f /var/lock/subsys/smb
411 status smbd; status nmbd;
414 echo -n "Restarting SMB services: "
419 echo "Usage: smb {start|stop|restart|status}"
426 <primary>samba control script</primary>
428 SUSE Linux implements individual control over each Samba daemon. A samba control script that can be conveniently
429 executed from the command line is shown in <link linkend="ch12SL"/>. This can be located in the directory
430 <filename>/sbin</filename> in a file called <filename>samba</filename>. This type of control script should be
431 owned by user root and group root, and set so that only root can execute it.
435 <primary>startup script</primary>
437 A sample startup script for a Red Hat Linux system is shown in <link linkend="ch12RHscript"/>.
438 This file could be located in the directory <filename>/etc/rc.d</filename> and can be called
439 <filename>samba</filename>. A similar startup script is required to control <command>winbind</command>.
440 If you want to find more information regarding startup scripts please refer to the packaging section of
441 the Samba source code distribution tarball. The packaging files for each platform include a
442 startup control file.
448 <title>DNS Configuration Files</title>
451 The following files are common to all DNS server configurations. Rather than repeat them multiple times, they
452 are presented here for general reference.
456 <title>The Forward Zone File for the Loopback Adaptor</title>
459 The forward zone file for the loopback address never changes. An example file is shown
460 in <link linkend="loopback"/>. All traffic destined for an IP address that is hosted on a
461 physical interface on the machine itself is routed to the loopback adaptor. This is
462 a fundamental design feature of the TCP/IP protocol implementation. The loopback adaptor
463 is called <constant>localhost</constant>.
466 <example id="loopback">
467 <title>DNS Localhost Forward Zone File: <filename>/var/lib/named/localhost.zone</filename></title>
485 <title>The Reverse Zone File for the Loopback Adaptor</title>
488 The reverse zone file for the loopback address as shown in <link linkend="dnsloopy"/>
489 is necessary so that references to the address <constant>127.0.0.1</constant> can be
490 resolved to the correct name of the interface.
493 <example id="dnsloopy">
494 <title>DNS Localhost Reverse Zone File: <filename>/var/lib/named/127.0.0.zone</filename></title>
497 @ IN SOA localhost. root.localhost. (
509 <example id="roothint">
510 <title>DNS Root Name Server Hint File: <filename>/var/lib/named/root.hint</filename></title>
512 ; This file is made available by InterNIC under anonymous FTP as
513 ; file /domain/named.root
514 ; on server FTP.INTERNIC.NET
515 ; last update: Nov 5, 2002. Related version of root zone: 2002110501
516 ; formerly NS.INTERNIC.NET
517 . 3600000 IN NS A.ROOT-SERVERS.NET.
518 A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
519 ; formerly NS1.ISI.EDU
520 . 3600000 NS B.ROOT-SERVERS.NET.
521 B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107
523 . 3600000 NS C.ROOT-SERVERS.NET.
524 C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
525 ; formerly TERP.UMD.EDU
526 . 3600000 NS D.ROOT-SERVERS.NET.
527 D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
528 ; formerly NS.NASA.GOV
529 . 3600000 NS E.ROOT-SERVERS.NET.
530 E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
531 ; formerly NS.ISC.ORG
532 . 3600000 NS F.ROOT-SERVERS.NET.
533 F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
534 ; formerly NS.NIC.DDN.MIL
535 . 3600000 NS G.ROOT-SERVERS.NET.
536 G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
537 ; formerly AOS.ARL.ARMY.MIL
538 . 3600000 NS H.ROOT-SERVERS.NET.
539 H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
540 ; formerly NIC.NORDU.NET
541 . 3600000 NS I.ROOT-SERVERS.NET.
542 I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
543 ; operated by VeriSign, Inc.
544 . 3600000 NS J.ROOT-SERVERS.NET.
545 J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
546 ; housed in LINX, operated by RIPE NCC
547 . 3600000 NS K.ROOT-SERVERS.NET.
548 K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
550 . 3600000 NS L.ROOT-SERVERS.NET.
551 L.ROOT-SERVERS.NET. 3600000 A 198.32.64.12
552 ; housed in Japan, operated by WIDE
553 . 3600000 NS M.ROOT-SERVERS.NET.
554 M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
561 <title>DNS Root Server Hint File</title>
564 The content of the root hints file as shown in <link linkend="roothint"/> changes slowly over time.
565 Periodically this file should be updated from the source shown. Because
566 of its size this file is located at the end of this appendix.
573 <sect1 id="altldapcfg">
574 <title>Alternative LDAP Database Initialization</title>
577 <primary>LDAP</primary>
578 <secondary>database</secondary>
579 </indexterm><indexterm>
580 <primary>LDAP</primary>
581 <secondary>initial configuration</secondary>
583 The following procedure may be used as an alternative means of configuring
584 the initial LDAP database. Many administrators prefer to have greater control
585 over how system files get configured.
589 <title>Initialization of the LDAP Database</title>
592 <primary>LDIF</primary>
593 </indexterm><indexterm>
594 <primary>Domain Groups</primary>
595 <secondary>well-known</secondary>
596 </indexterm><indexterm>
597 <primary>SID</primary>
599 The first step to get the LDAP server ready for action is to create the LDIF file from
600 which the LDAP database will be preloaded. This is necessary to create the containers
601 into which the user, group, and so on, accounts is written. It is also necessary to
602 preload the well-known Windows NT Domain Groups, as they must have the correct SID so
603 that they can be recognized as special NT Groups by the MS Windows clients.
606 <procedure id="ldapinit">
608 Create a directory in which to store the files you use to generate
609 the LDAP LDIF file for your system. Execute the following:
611 &rootprompt; mkdir /etc/openldap/SambaInit
612 &rootprompt; chown root.root /etc/openldap/SambaInit
613 &rootprompt; chmod 700 /etc/openldap/SambaInit
618 Install the files shown in <link linkend="ch6-ldapreconfa"/>, <link linkend="ch6-ldapreconfb"/>,
619 and <link linkend="ch6-ldapreconfc"/> into the directory
620 <filename>/etc/openldap/SambaInit/SMBLDAP-ldif-preconfig.sh.</filename> These three files are,
621 respectively, Part A, B, and C of the <filename>SMBLDAP-ldif-preconfig.sh</filename> file.
625 Install the files shown in <link linkend="ch6-ldifpata"/> and <link linkend="ch6-ldifpatb"/> into the directory
626 <filename>/etc/openldap/SambaInit/nit-ldif.pat.</filename> These two files are
627 Part A and B, respectively, of the <filename>init-ldif.pat</filename> file.
631 Change to the <filename>/etc/openldap/SambaInit</filename> directory. Execute the following:
633 &rootprompt; ./SMBLDAP-ldif-preconfig.sh
635 How do you wish to refer to your organization?
637 Black Tire Company, Inc.
639 How would you like your organization name to appear?
640 Your organization name is: My Organization
641 Enter a new name is this is not what you want, press Enter to Continue.
642 Name [My Organization]: Abmas Inc.
644 Samba Config File Location [/etc/samba/smb.conf]:
645 Enter a new full path or press Enter to continue.
646 Samba Config File Location [/etc/samba/smb.conf]:
647 Domain Name: MEGANET2
648 Domain SID: S-1-5-21-3504140859-1010554828-2431957765
650 The name of your Internet domain is now needed in a special format
651 as follows, if your domain name is mydomain.org, what we need is
652 the information in the form of:
655 If your fully qualified hostname is: snoopy.bazaar.garagesale.net
656 where "snoopy" is the name of the machine,
657 Then the information needed is:
658 Domain ID: garagesale
661 Found the following domain name: abmas.biz
662 I think the bit we are looking for might be: abmas
663 Enter the domain name or press Enter to continue:
665 The top level organization name I will use is: biz
666 Enter the top level org name or press Enter to continue:
669 This creates a file called <filename>MEGANET2.ldif</filename>.
673 It is now time to preload the LDAP database with the following
676 &rootprompt; slapadd -v -l MEGANET2.ldif
677 added: "dc=abmas,dc=biz" (00000001)
678 added: "cn=Manager,dc=abmas,dc=biz" (00000002)
679 added: "ou=People,dc=abmas,dc=biz" (00000003)
680 added: "ou=Computers,dc=abmas,dc=biz" (00000004)
681 added: "ou=Groups,dc=abmas,dc=biz" (00000005)
682 added: "ou=Domains,dc=abmas,dc=biz" (00000006)
683 added: "sambaDomainName=MEGANET2,ou=Domains,dc=abmas,dc=biz" (00000007)
684 added: "cn=domadmins,ou=Groups,dc=abmas,dc=biz" (00000008)
685 added: "cn=domguests,ou=Groups,dc=abmas,dc=biz" (00000009)
686 added: "cn=domusers,ou=Groups,dc=abmas,dc=biz" (0000000a)
688 You should verify that the account information was correctly loaded by executing:
692 objectClass: dcObject
693 objectClass: organization
696 description: Posix and Samba LDAP Identity Database
697 structuralObjectClass: organization
698 entryUUID: af552f8e-c4a1-1027-9002-9421e01bf474
699 creatorsName: cn=manager,dc=abmas,dc=biz
700 modifiersName: cn=manager,dc=abmas,dc=biz
701 createTimestamp: 20031217055747Z
702 modifyTimestamp: 20031217055747Z
703 entryCSN: 2003121705:57:47Z#0x0001#0#0000
706 dn: cn=domusers,ou=Groups,dc=abmas,dc=biz
707 objectClass: posixGroup
708 objectClass: sambaGroupMapping
711 sambaSID: S-1-5-21-3504140859-1010554828-2431957765-513
713 displayName: Domain Users
714 description: Domain Users
715 structuralObjectClass: posixGroup
716 entryUUID: af7e98ba-c4a1-1027-900b-9421e01bf474
717 creatorsName: cn=manager,dc=abmas,dc=biz
718 modifiersName: cn=manager,dc=abmas,dc=biz
719 createTimestamp: 20031217055747Z
720 modifyTimestamp: 20031217055747Z
721 entryCSN: 2003121705:57:47Z#0x000a#0#0000
726 Your LDAP database is ready for testing. You can now start the LDAP server
727 using the system tool for your Linux operating system. For SUSE Linux, you can
730 &rootprompt; rcldap start
735 It is now a good idea to validate that the LDAP server is running correctly.
736 Execute the following:
738 &rootprompt; ldapsearch -x -b "dc=abmas,dc=biz" "(ObjectClass=*)"
742 # base <dc=abmas,dc=biz> with scope sub
743 # filter: (ObjectClass=*)
749 objectClass: dcObject
750 objectClass: organization
753 description: Posix and Samba LDAP Identity Database
755 # domusers, Groups, abmas.biz
756 dn: cn=domusers,ou=Groups,dc=abmas,dc=biz
757 objectClass: posixGroup
758 objectClass: sambaGroupMapping
761 sambaSID: S-1-5-21-3504140859-1010554828-2431957765-513
763 displayName: Domain Users
764 description: Domain Users
773 Your LDAP server is ready for creation of additional accounts.
779 <example id="ch6-ldapreconfa">
780 <title>LDAP Pre-configuration Script: <filename>SMBLDAP-ldif-preconfig.sh</filename> &smbmdash; Part A</title>
784 # This script prepares the ldif LDAP load file only
790 # The name of my organization
791 ORGNAME="My Organization"
793 # My Internet domain. ie: if my domain is: buckets.org, INETDOMAIN="buckets"
794 INETDOMAIN="my-domain"
796 # In the above case, md domain is: buckets.org, TLDORG="org"
799 # This is the Samba Domain/Workgroup Name
800 DOMNAME="MYWORKGROUP"
808 How do you wish to refer to your organization?
811 Black Tire Company, Inc.
814 How would you like your organization name to appear?
818 echo "Your organization name is: $ORGNAME"
820 echo "Enter a new name or, press Enter to Continue."
825 <example id="ch6-ldapreconfb">
826 <title>LDAP Pre-configuration Script: <filename>SMBLDAP-ldif-preconfig.sh</filename> &smbmdash; Part B</title>
828 echo -e -n "Name [$ORGNAME]: "
831 if [ ! -z "$name" ]; then
835 sed "s/ORGNAME/${ORGNAME}/g" < $file > $file.tmp1
837 # Try to find smb.conf
839 if [ -e /usr/local/samba/lib/smb.conf ]; then
840 CONF=/usr/local/samba/lib/smb.conf
841 elif [ -e /etc/samba/smb.conf ]; then
842 CONF=/etc/samba/smb.conf
845 echo "Samba Config File Location [$CONF]: "
847 echo "Enter a new full path or press Enter to continue."
849 echo -n "Samba Config File Location [$CONF]: "
851 if [ ! -z "$name" ]; then
856 # Find the name of our Domain/Workgroup
857 DOMNAME=`grep -i workgroup ${CONF} | sed "s/ //g" | cut -f2 -d=`
858 echo Domain Name: $DOMNAME
861 sed "s/DOMNAME/${DOMNAME}/g" < $file.tmp1 > $file.tmp2
863 DOMSID=`net getlocalsid ${DOMNAME} | cut -f2 -d: | sed "s/ //g"`
864 echo Domain SID: $DOMSID
866 sed "s/DOMSID/${DOMSID}/g" < $file.tmp2 > $file.tmp1
870 <example id="ch6-ldapreconfc">
871 <title>LDAP Pre-configuration Script: <filename>SMBLDAP-ldif-preconfig.sh</filename> &smbmdash; Part C</title>
874 The name of your Internet domain is now needed in a special format
875 as follows, if your domain name is mydomain.org, what we need is
876 the information in the form of:
880 If your fully qualified hostname is: snoopy.bazaar.garagesale.net
881 where "snoopy" is the name of the machine,
882 Then the information needed is:
883 Domain ID: garagesale
887 INETDOMAIN=`hostname -d | cut -f1 -d.`
888 echo Found the following domain name: `hostname -d`
889 echo "I think the bit we are looking for might be: $INETDOMAIN"
891 echo -n "Enter the domain name or press Enter to continue: "
893 if [ ! -z $domnam ]; then
897 sed "s/INETDOMAIN/${INETDOMAIN}/g" < $file.tmp1 > $file.tmp2
898 TLDORG=`hostname -d | sed "s/${INETDOMAIN}.//g"`
899 echo "The top level organization name I will use is: ${TLDORG}"
901 echo -n "Enter the top level org name or press Enter to continue: "
903 if [ ! -z $domnam ]; then
906 sed "s/TLDORG/${TLDORG}/g" < $file.tmp2 > $DOMNAME.ldif
912 <example id="ch6-ldifpata">
913 <title>LDIF Pattern File Used to Pre-configure LDAP &smbmdash; Part A</title>
915 dn: dc=INETDOMAIN,dc=TLDORG
916 objectClass: dcObject
917 objectClass: organization
920 description: Posix and Samba LDAP Identity Database
922 dn: cn=Manager,dc=INETDOMAIN,dc=TLDORG
923 objectClass: organizationalRole
925 description: Directory Manager
927 dn: ou=People,dc=INETDOMAIN,dc=TLDORG
929 objectClass: organizationalUnit
932 dn: ou=Computers,dc=INETDOMAIN,dc=TLDORG
934 objectClass: organizationalUnit
937 dn: ou=Groups,dc=INETDOMAIN,dc=TLDORG
939 objectClass: organizationalUnit
942 dn: ou=Idmap,dc=INETDOMAIN,dc=TLDORG
944 objectClass: organizationalUnit
947 dn: sambaDomainName=DOMNAME,ou=Domains,dc=INETDOMAIN,dc=TLDORG
948 objectClass: sambaDomain
949 sambaDomainName: DOMNAME
951 sambaAlgorithmicRidBase: 1000
952 structuralObjectClass: sambaDomain
956 <example id="ch6-ldifpatb">
957 <title>LDIF Pattern File Used to Pre-configure LDAP &smbmdash; Part B</title>
959 dn: cn=domadmins,ou=Groups,dc=INETDOMAIN,dc=TLDORG
960 objectClass: posixGroup
961 objectClass: sambaGroupMapping
966 displayName: Domain Admins
967 description: Domain Administrators
969 dn: cn=domguests,ou=Groups,dc=INETDOMAIN,dc=TLDORG
970 objectClass: posixGroup
971 objectClass: sambaGroupMapping
976 displayName: Domain Guests
977 description: Domain Guests Users
979 dn: cn=domusers,ou=Groups,dc=INETDOMAIN,dc=TLDORG
980 objectClass: posixGroup
981 objectClass: sambaGroupMapping
986 displayName: Domain Users
987 description: Domain Users
994 <title>The LDAP Account Manager</title>
997 <primary>LAM</primary>
998 </indexterm><indexterm>
999 <primary>LDAP Account Manager</primary>
1001 </indexterm><indexterm>
1002 <primary>PHP</primary>
1003 </indexterm><indexterm>
1004 <primary>unencrypted</primary>
1005 </indexterm><indexterm>
1006 <primary>SSL</primary>
1007 </indexterm><indexterm>
1008 <primary>Posix</primary>
1009 </indexterm><indexterm>
1010 <primary>accounts</primary><secondary>manage</secondary>
1012 The LDAP Account Manager (LAM) is an application suite that has been written in PHP.
1013 LAM can be used with any Web server that has PHP4 support. It connects to the LDAP
1014 server either using unencrypted connections or via SSL. LAM can be used to manage
1015 Posix accounts as well as SambaSAMAccounts for users, groups, and Windows machines
1020 LAM is available from the <ulink url="http://sourceforge.net/projects/lam/">LAM</ulink>
1021 home page and from its mirror sites. LAM has been released under the GNU GPL version 2.
1022 The current version of LAM is 0.4.3. Release of version 0.5 is expected some time early
1027 <primary>PHP4</primary>
1028 </indexterm><indexterm>
1029 <primary>OpenLDAP</primary>
1030 </indexterm><indexterm>
1031 <primary>Perl</primary>
1037 <listitem><para>A web server that will work with PHP4.</para></listitem>
1038 <listitem><para>PHP4 (available from the <ulink url="http://www.php.net/">
1039 PHP</ulink> home page.)</para></listitem>
1040 <listitem><para>OpenLDAP 2.0 or later.</para></listitem>
1041 <listitem><para>A Web browser that supports CSS.</para></listitem>
1042 <listitem><para>Perl.</para></listitem>
1043 <listitem><para>The gettext package.</para></listitem>
1044 <listitem><para>mcrypt + mhash (optional since version 0.4.3).</para></listitem>
1045 <listitem><para>It is also a good idea to install SSL support.</para></listitem>
1049 LAM is a useful tool that provides a simple Web-based device that can be used to
1050 manage the contents of the LDAP directory to:<indexterm>
1051 <primary>organizational units</primary>
1052 </indexterm><indexterm>
1053 <primary>operating profiles</primary>
1054 </indexterm><indexterm>
1055 <primary>account policies</primary>
1060 <listitem><para>Display user/group/host and Domain entries.</para></listitem>
1061 <listitem><para>Manages entries (Add/Delete/Edit).</para></listitem>
1062 <listitem><para>Filter and sort entries.</para></listitem>
1063 <listitem><para>Set LAM administrator accounts.</para></listitem>
1064 <listitem><para>Store and use multiple operating profiles.</para></listitem>
1065 <listitem><para>Edit organizational units (OUs).</para></listitem>
1066 <listitem><para>Upload accounts from a file.</para></listitem>
1067 <listitem><para></para>Is compatible with Samba-2.2.x and Samba-3.</listitem>
1071 When correctly configured, LAM allows convenient management of UNIX (Posix) and Samba
1072 user, group, and windows domain member machine accounts.
1076 <primary>default password</primary>
1077 </indexterm><indexterm>
1078 <primary>secure connections</primary>
1079 </indexterm><indexterm>
1080 <primary>LAM</primary>
1081 </indexterm><indexterm>
1082 <primary>SSL</primary>
1084 The default password is <quote>lam.</quote> It is highly recommended that you use only
1085 an SSL connection to your Web server for all remote operations involving LAM. If you
1086 want secure connections, you must configure your Apache Web server to permit connections
1087 to LAM using only SSL.
1090 <procedure id="ch6-laminst">
1092 Extract the LAM package with:
1094 &rootprompt; tar xzf ldap-account-manager_0.4.3.tar.gz
1096 Alternately, install the LAM RPM for your system using the following example for
1099 &rootprompt; rpm -Uvh ldap-account-manager-0.4.3-1.noarch.rpm
1104 Copy the extracted files to the document root directory of your Web server.
1105 For example, on SuSE Linux Enterprise Server 8, copy to the
1106 <filename>/srv/web/htdocs</filename> directory.
1109 <step><para><indexterm>
1110 <primary>file permissions</primary>
1112 Set file permissions using the following commands:
1114 &rootprompt; chown -R wwwrun.www /srv/www/htdocs/lam
1115 &rootprompt; chmod 755 /srv/www/htdocs/lam/sess
1116 &rootprompt; chmod 755 /srv/www/htdocs/lam/tmp
1117 &rootprompt; chmod 755 /srv/www/htdocs/lam/config
1118 &rootprompt; chmod 755 /srv/www/htdocs/lam/lib/*pl
1122 <step><para><indexterm>
1123 <primary>LAM</primary>
1124 <secondary>configuration file</secondary>
1126 Using your favorite editor create the following <filename>config.cfg</filename>
1127 LAM configuration file:
1129 &rootprompt; cd /srv/www/htdocs/lam/config
1130 &rootprompt; cp config.cfg_sample config.cfg
1131 &rootprompt; vi config.cfg
1132 </screen><indexterm>
1133 <primary>LAM</primary>
1134 <secondary>profile</secondary>
1135 </indexterm><indexterm>
1136 <primary>LAM</primary>
1137 <secondary>wizard</secondary>
1139 An example file is shown in <link linkend="lamcfg"/>.
1140 This is the minimum configuration that must be completed. The LAM profile
1141 file can be created using a convenient wizard that is part of the LAM
1142 configuration suite.
1146 Start your Web server then, using your Web browser, connect to
1147 <ulink url="http://localhost/lam">LAM</ulink> URL. Click on the
1148 the <parameter>Configuration Login</parameter> link then click on the
1149 Configuration Wizard link to begin creation of the default profile so that
1150 LAM can connect to your LDAP server. Alternately, copy the
1151 <filename>lam.conf_sample</filename> file to a file called
1152 <filename>lam.conf</filename> then, using your favorite editor,
1153 change the settings to match local site needs.
1158 <primary>pitfalls</primary>
1160 An example of a working file is shown here in <link linkend="lamconf"/>.
1161 This file has been stripped of comments to keep the size small. The comments
1162 and help information provided in the profile file that the wizard creates
1163 is very useful and will help many administrators to avoid pitfalls.
1164 Your configuration file obviously reflects the configuration options that
1165 are preferred at your site.
1169 <primary>LAM</primary>
1170 <secondary>login screen</secondary>
1172 It is important that your LDAP server is running at the time that LAM is
1173 being configured. This permits you to validate correct operation.
1174 An example of the LAM login screen is provided in <link linkend="lam-login"/>.
1177 <image id="lam-login">
1178 <imagedescription>The LDAP Account Manager Login Screen</imagedescription>
1179 <imagefile scale="50">lam-login</imagefile>
1183 <primary>LAM</primary>
1184 <secondary>configuration editor</secondary>
1186 The LAM configuration editor has a number of options that must be managed correctly.
1187 An example of use of the LAM configuration editor is shown in <link linkend="lam-config"/>.
1188 It is important that you correctly set the minimum and maximum UID/GID values that are
1189 permitted for use at your site. The default values may not be compatible with a need to
1190 modify initial default account values for well-known Windows network users and groups.
1191 The best work-around is to temporarily set the minimum values to zero (0) to permit
1192 the initial settings to be made. Do not forget to reset these to sensible values before
1193 using LAM to add additional users and groups.
1196 <image id="lam-config">
1197 <imagedescription>The LDAP Account Manager Configuration Screen</imagedescription>
1198 <imagefile scale="50">lam-config</imagefile>
1202 <primary>PDF</primary>
1204 LAM has some nice, but unusual features. For example, one unexpected feature in most application
1205 screens permits the generation of a PDF file that lists configuration information. This is a well
1206 thought out facility. This option has been edited out of the following screen shots to conserve
1211 <primary>LAM</primary>
1212 <secondary>opening screen</secondary>
1214 When you log onto LAM the opening screen drops you right into the user manager as shown in
1215 <link linkend="lam-user"/>. This is a logical action as it permits the most-needed facility
1216 to be used immediately. The editing of an existing user, as with the addition of a new user,
1217 is easy to follow and very clear in both layout and intent. It is a simple matter to edit
1218 generic settings, UNIX specific parameters, and then Samba account requirements. Each step
1219 involves clicking a button that intuitively drives you through the process. When you have
1220 finished editing simply press the <guimenu>Final</guimenu> button.
1223 <image id="lam-user">
1224 <imagedescription>The LDAP Account Manager User Edit Screen</imagedescription>
1225 <imagefile scale="50">lam-users</imagefile>
1229 The edit screen for groups is shown in <link linkend="lam-group"/>. As with the edit screen
1230 for user accounts, group accounts may be rapidly dealt with. <link linkend="lam-group-mem"/>
1231 shown a sub-screen from the group editor that permits users to be assigned secondary group
1235 <image id="lam-group">
1236 <imagedescription>The LDAP Account Manager Group Edit Screen</imagedescription>
1237 <imagefile scale="50">lam-groups</imagefile>
1240 <image id="lam-group-mem">
1241 <imagedescription>The LDAP Account Manager Group Membership Edit Screen</imagedescription>
1242 <imagefile scale="50">lam-group-members</imagefile>
1246 <primary>smbldap-tools</primary>
1247 </indexterm><indexterm>
1248 <primary>scripts</primary>
1250 The final screen presented here is one that you should not normally need to use. Host accounts will
1251 be automatically managed using the smbldap-tools scripts. This means that the screen <link linkend="lam-host"/>
1252 will, in most cases, not be used.
1255 <image id="lam-host">
1256 <imagedescription>The LDAP Account Manager Host Edit Screen</imagedescription>
1257 <imagefile scale="50">lam-hosts</imagefile>
1261 One aspect of LAM that may annoy some users is the way it forces certain conventions on
1262 the administrator. For example, LAM does not permit the creation of Windows user and group
1263 accounts that contain upper-case characters or spaces even though the underlying UNIX/Linux
1264 operating system may exhibit no problems with them. Given the propensity for using upper-case
1265 characters and spaces (particularly in the default Windows account names) this may cause
1266 some annoyance. For the rest, LAM is a very useful administrative tool.
1269 <example id="lamcfg">
1270 <title>Example LAM Configuration File &smbmdash; <filename>config.cfg</filename></title>
1272 # password to add/delete/rename configuration profiles
1275 # default profile, without ".conf"
1280 <example id="lamconf">
1281 <title>LAM Profile Control File &smbmdash; <filename>lam.conf</filename></title>
1283 ServerURL: ldap://massive.abmas.org:389
1284 Admins: cn=Manager,dc=abmas,dc=biz
1286 usersuffix: ou=People,dc=abmas,dc=biz
1287 groupsuffix: ou=Groups,dc=abmas,dc=biz
1288 hostsuffix: ou=Computers,dc=abmas,dc=biz
1289 domainsuffix: ou=Domains,dc=abmas,dc=biz
1296 userlistAttributes: #uid;#givenName;#sn;#uidNumber;#gidNumber
1297 grouplistAttributes: #cn;#gidNumber;#memberUID;#description
1298 hostlistAttributes: #cn;#description;#uidNumber;#gidNumber
1300 defaultLanguage: en_GB:ISO-8859-1:English (Britain)
1311 <sect1 id="ch12-SUIDSGID">
1312 <title>Effect of Setting File and Directory SUID/SGID Permissions Explained</title>
1314 <indexterm><primary>SUID</primary></indexterm>
1315 <indexterm><primary>SGID</primary></indexterm>
1317 The setting of the SUID/SGID bits on the file or directory permissions flag has particular
1318 consequences. If the file is executable and the SUID bit is set, it executes with the privilege
1319 of (with the UID of) the owner of the file. For example, if you are logged onto a system as
1320 a normal user (let's say as the user <constant>bobj</constant>), and you execute a file that is owned
1321 by the user <constant>root</constant> (uid = 0), and the file has the SUID bit set, then the file is
1322 executed as if you had logged in as the user <constant>root</constant> and then executed the file.
1323 The SUID bit effectively gives you (as <constant>bobj</constant>) administrative privilege for the
1324 use of that executable file.
1328 The setting of the SGID bit does precisely the same as the effect of the SUID bit, except that it
1329 applies the privilege to the UNIX group setting. In other words, the file executes with the force
1330 of capability of the group.
1334 When the SUID/SGID permissions are set on a directory, all files that are created within that directory
1335 is automatically given the ownership of the SUID user and the SGID group, as per the ownership
1336 of the directory in which the file is created. This means that the system level <command>create()</command>
1337 function executes with the SUID user and/or SGID group of the directory in which the file is
1342 If you want to obtain the SUID behavior, simply execute the following command:
1344 &rootprompt; chmod u+s file-or-directory
1346 To set the SGID properties on a file or a directory, execute this command:
1348 &rootprompt; chmod g+s file-or-directory
1350 And to set both SUID and SGID properties, execute the following:
1352 &rootprompt; chmod ug+s file-or-directory
1357 Let's consider the example of a directory <filename>/data/accounts</filename>. The permissions on this
1358 directory before setting both SUID and SGID on this directory are:
1360 &rootprompt; ls -al /data/accounts
1362 drwxr-xr-x 10 root root 232 Dec 18 17:08 .
1363 drwxr-xr-x 21 root root 600 Dec 17 23:15 ..
1364 drwxrwxrwx 2 bobj Domain Users 48 Dec 18 17:08 accounts/
1365 drwx------ 2 root root 48 Jan 26 2002 lost+found
1367 In this example, if the user <constant>maryv</constant> creates a file, it would be owned by her.
1368 If <constant>maryv</constant> has the primary group of <constant>Accounts</constant>, the file is
1369 owned by the group <constant>Accounts</constant> as shown in this listing:
1371 &rootprompt; ls -al /data/accounts/maryvfile.txt
1372 drw-rw-r-- 2 maryv Accounts 12346 Dec 18 17:53
1377 Now you set the SUID and SGID and check the result as follows:
1379 &rootprompt; chmod ug+s /data/accounts
1380 &rootprompt; ls -al /data/accounts
1382 drwxr-xr-x 10 root root 232 Dec 18 17:08 .
1383 drwxr-xr-x 21 root root 600 Dec 17 23:15 ..
1384 drwsrwsr-x 2 bobj Domain Users 48 Dec 18 17:08 accounts
1385 drwx------ 2 root root 48 Jan 26 2002 lost+found
1387 If <constant>maryv</constant> creates a file in this directory after this change has been made, the
1388 file is owned by the user <constant>bobj</constant>, and the group is set to the group
1389 <constant>Domain Users</constant> as shown here:
1391 &rootprompt; chmod ug+s /data/accounts
1392 &rootprompt; ls -al /data/accounts/maryvfile.txt
1394 drw-rw-r-- 2 bobj Domain Users 12346 Dec 18 18:11 maryvfile.txt
1400 <sect1 id="ch12dblck">
1401 <title>Shared Data Integrity</title>
1404 <primary>data integrity</primary>
1405 </indexterm><indexterm>
1406 <primary>multi-user</primary>
1407 <secondary>data access</secondary>
1409 The integrity of shared data is often viewed as a particularly emotional issue, especially where
1410 there are concurrent problems with multi-user data access. Contrary to the assertions of some who have
1411 experienced problems in either area, the cause has nothing to do with the phases of the moons of Jupiter.
1415 The solution to concurrent multi-user data access problems must consider three separate areas
1416 from which the problem may stem:<indexterm>
1417 <primary>locking</primary>
1418 <secondary>Application level</secondary>
1419 </indexterm><indexterm>
1420 <primary>locking</primary>
1421 <secondary>Client side</secondary>
1422 </indexterm><indexterm>
1423 <primary>locking</primary>
1424 <secondary>Server side</secondary>
1429 <listitem><para>application level locking controls.</para></listitem>
1430 <listitem><para>client side locking controls.</para></listitem>
1431 <listitem><para>server side locking controls.</para></listitem>
1435 <primary>database applications</primary>
1436 </indexterm><indexterm>
1437 <primary>Microsoft Access</primary>
1439 Many database applications use some form of application-level access control. An example of one
1440 well-known application that uses application-level locking is Microsoft Access. Detailed guidance
1441 is provided given that this is the most common application for which problems have been reported.
1445 <primary>Microsoft Excel</primary>
1446 </indexterm><indexterm>
1447 <primary>Act!</primary>
1449 Common applications that are affected by client- and server-side locking controls include MS
1450 Excel and Act!. Important locking guidance is provided here.
1455 <title>Microsoft Access</title>
1458 The best advice that can be given is to carefully read the Microsoft knowledge base articles that
1459 cover this area. Examples of relevant documents includes:
1463 <listitem><para>http://support.microsoft.com/default.aspx?scid=kb;en-us;208778</para></listitem>
1464 <listitem><para>http://support.microsoft.com/default.aspx?scid=kb;en-us;299373</para></listitem>
1469 <primary>multi-user</primary>
1470 <secondary>access</secondary>
1471 </indexterm><indexterm>
1472 <primary>exclusive open</primary>
1474 Make sure that your MS Access database file is configured for multi-user access (not set for
1475 exclusive open). Open MS Access on each client workstation then set the following: <menuchoice>
1476 <guimenu>(Menu bar) Tools</guimenu><guimenu>Options</guimenu><guimenu>[tab] General</guimenu>
1477 </menuchoice>. Set network path to Default database folder: <filename>\\server\share\folder</filename>.
1481 You can configure MS Access file sharing behavior as follows: click <guimenu>[tab] Advanced</guimenu>.
1483 <primary>record locking</primary>
1488 <listitem><para>Default open mode: Shared</para></listitem>
1489 <listitem><para>Default Record Locking: Edited Record</para></listitem>
1490 <listitem><para>Open databases using record_level locking</para></listitem>
1494 <primary>MS Access</primary>
1495 <secondary>validate</secondary>
1497 You must now commit the changes so that they will take effect. To do so, click
1498 <guimenu>Apply</guimenu><guimenu>Ok</guimenu>. At this point, you should exit MS Access, restart
1499 it and then validate that these settings have not changed.
1505 <title>Act! Database Sharing</title>
1508 <primary>ACT! database</primary>
1509 </indexterm><indexterm>
1510 <primary>data corruption</primary>
1512 Where the server sharing the ACT! database(s) is running Samba, Windows NT, 200x or XP, you
1513 must disable opportunistic locking on the server and all workstations. Failure to do so
1514 results in data corruption. This information is available from the Act! Web site
1515 knowledge-base articles
1516 <ulink url="http://itdomino.saleslogix.com/act.nsf/docid/1998223162925">1998223162925</ulink>
1517 as well as from article
1518 <ulink url="http://itdomino.saleslogix.com/act.nsf/docid/200110485036">200110485036</ulink>.
1522 <primary>opportunistic locking</primary>
1523 </indexterm><indexterm>
1524 <primary>Act!Diag</primary>
1526 These documents clearly state that opportunistic locking must be disabled on both
1527 the server (Samba in the case we are interested in here), as well as on every workstation
1528 from which the centrally shared Act! database will be accessed. Act! provides
1529 a tool called <command>Act!Diag</command> that may be used to disable all workstation
1530 registry settings that may otherwise interfere with the operation of Act!
1531 Registered Act! users may download this utility from the Act! Web
1532 <ulink url="http://www.act.com/support/updates/index.cfm">site.</ulink>
1538 <title>Opportunistic Locking Controls</title>
1541 <primary>file cacheing</primary>
1543 Third-party Windows applications may not be compatible with the use of opportunistic file
1544 and record locking. For applications that are known not to be compatible,<footnote>Refer to
1545 the application manufacturers' installation guidelines and knowledge base for specific
1546 information regarding compatibility. It is often safe to assume that if the software
1547 manufacturer does not specifically mention incompatibilities with opportunistic file
1548 and record locking, or with Windows client file cacheing, the application is probably
1549 compatible with Windows (as well as Samba) default settings.</footnote> oplock
1550 support may need to be disabled both on the Samba server and on the Windows workstations.
1554 <primary>cache</primary>
1555 </indexterm><indexterm>
1556 <primary>write lock</primary>
1557 </indexterm><indexterm>
1558 <primary>flush</primary>
1559 <secondary>cache memory</secondary>
1561 Oplocks enable a Windows client to cache parts of a file that are being
1562 edited. Another windows client may then request to open the file with the
1563 ability to write to it. The server will then ask the original workstation
1564 that had the file open with a write lock to release it's lock. Before
1565 doing so, that workstation must flush the file from cache memory to the
1566 disk or network drive.
1570 <primary>Oplocks</primary>
1571 <secondary>disabled</secondary>
1573 Disabling of Oplocks usage may require server and client changes.
1574 Oplocks may be disabled by file, by file pattern, on the share, or on the
1579 The following are examples showing how Oplock support may be managed using
1580 Samba &smb.conf; file settings:
1582 By file: veto oplock files = myfile.mdb
1584 By Pattern: veto oplock files = /*.mdb/
1586 On the Share: oplocks = No
1590 (in [global]) oplocks = No
1596 The following registry entries on Microsoft Windows XP Professional, 2000 Professional and Windows NT4
1597 workstation clients must be configured as shown here:
1601 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
1602 Services\LanmanServer\Parameters]
1603 "EnableOplocks"=dword:00000000
1605 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
1606 Services\LanmanWorkstation\Parameters]
1607 "UseOpportunisticLocking"=dword:00000000
1612 Comprehensive coverage of file and record locking controls is provided in TOSHARG Chapter 13.
1613 The information provided in that chapter was obtained from a wide variety of sources.