Merge Samba3 and Samba4 together
[bbaumbach/samba-autobuild/.git] / docs-xml / smbdotconf / logon / logonscript.xml
1 <samba:parameter name="logon script"
2                  context="G"
3                  advanced="1" developer="1"
4                                  type="string"
5                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
6 <description>
7         <para>
8         This parameter specifies the batch file (<filename>.bat</filename>) or NT command file
9         (<filename>.cmd</filename>) to be downloaded and run on a machine when a user successfully logs in.  The file
10         must contain the DOS style CR/LF line endings. Using a DOS-style editor to create the file is recommended.
11         </para>
12                 
13         <para>
14         The script must be a relative path to the <smbconfsection name="[netlogon]"/> service.  If the [netlogon]
15         service specifies a <smbconfoption name="path"/> of <filename
16         moreinfo="none">/usr/local/samba/netlogon</filename>, and <smbconfoption name="logon
17         script">STARTUP.BAT</smbconfoption>, then the file that will be downloaded is:
18 <programlisting>
19         /usr/local/samba/netlogon/STARTUP.BAT
20 </programlisting>
21         </para>
22
23         <para>
24         The contents of the batch file are entirely your choice.  A suggested command would be to add <command
25         moreinfo="none">NET TIME \\SERVER /SET /YES</command>, to force every machine to synchronize clocks with the
26         same time server.  Another use would be to add <command moreinfo="none">NET USE U: \\SERVER\UTILS</command>
27         for commonly used utilities, or 
28 <programlisting>
29 <userinput>NET USE Q: \\SERVER\ISO9001_QA</userinput>
30 </programlisting> 
31         for example.
32         </para>
33
34         <para>
35         Note that it is particularly important not to allow write access to the [netlogon] share, or to grant users
36         write permission on the batch files in a secure environment, as this would allow the batch files to be
37         arbitrarily modified and security to be breached.       
38         </para>
39
40         <para>
41         This option takes the standard substitutions, allowing you to have separate logon scripts for each user or
42         machine.
43         </para>
44
45         <para>
46         This option is only useful if Samba is set up as a logon server.
47         </para>
48 </description>
49 <value type="default"></value>
50 <value type="example">scripts\%U.bat</value>
51 </samba:parameter>