1 <samba:parameter xmlns:samba="http://samba.org/common">
2 <term><anchor id="LOGONSCRIPT"/>logon script (G)</term>
3 <listitem><para>This parameter specifies the batch file (.bat) or
4 NT command file (.cmd) to be downloaded and run on a machine when
5 a user successfully logs in. The file must contain the DOS
6 style CR/LF line endings. Using a DOS-style editor to create the
7 file is recommended.</para>
9 <para>The script must be a relative path to the [netlogon]
10 service. If the [netlogon] service specifies a <link linkend="PATH">
11 <parameter moreinfo="none">path</parameter></link> of <filename moreinfo="none">/usr/local/samba/netlogon
12 </filename>, and <command moreinfo="none">logon script = STARTUP.BAT</command>, then
13 the file that will be downloaded is:</para>
15 <para><filename moreinfo="none">/usr/local/samba/netlogon/STARTUP.BAT</filename></para>
17 <para>The contents of the batch file are entirely your choice. A
18 suggested command would be to add <command moreinfo="none">NET TIME \\SERVER /SET
19 /YES</command>, to force every machine to synchronize clocks with
20 the same time server. Another use would be to add <command moreinfo="none">NET USE
21 U: \\SERVER\UTILS</command> for commonly used utilities, or <command moreinfo="none">
22 NET USE Q: \\SERVER\ISO9001_QA</command> for example.</para>
24 <para>Note that it is particularly important not to allow write
25 access to the [netlogon] share, or to grant users write permission
26 on the batch files in a secure environment, as this would allow
27 the batch files to be arbitrarily modified and security to be
30 <para>This option takes the standard substitutions, allowing you
31 to have separate logon scripts for each user or machine.</para>
33 <para>This option is only useful if Samba is set up as a logon
36 <para>Default: <emphasis>no logon script defined</emphasis></para>
37 <para>Example: <command moreinfo="none">logon script = scripts\%U.bat</command></para>