summaryrefslogtreecommitdiff
path: root/docs/docbook/smbdotconf/logon/logonscript.xml
blob: 65b6253c0c075b8e1a2a22d2e3e425aeb1407c28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<samba:parameter name="logon script"
                 context="G"
                 advanced="1" developer="1"
                 xmlns:samba="http://samba.org/common">
<listitem>
	<para>This parameter specifies the batch file (.bat) or 
	NT command file (.cmd) to be downloaded and run on a machine when 
	a user successfully logs in.  The file must contain the DOS 
	style CR/LF line endings. Using a DOS-style editor to create the 
	file is recommended.</para>
		
	<para>The script must be a relative path to the [netlogon] 
	service.  If the [netlogon] service specifies a <link linkend="PATH">
	<parameter moreinfo="none">path</parameter></link> of <filename 
	moreinfo="none">/usr/local/samba/netlogon</filename>, and <command 
	moreinfo="none">logon script = STARTUP.BAT</command>, then 
	the file that will be downloaded is:</para>

	<para><filename moreinfo="none">/usr/local/samba/netlogon/STARTUP.BAT</filename></para>

	<para>The contents of the batch file are entirely your choice.  A 
	suggested command would be to add <command moreinfo="none">NET TIME \\SERVER /SET 
	/YES</command>, to force every machine to synchronize clocks with 
	the same time server.  Another use would be to add <command moreinfo="none">NET USE 
	U: \\SERVER\UTILS</command> for commonly used utilities, or <command moreinfo="none">
	NET USE Q: \\SERVER\ISO9001_QA</command> for example.</para>

	<para>Note that it is particularly important not to allow write 
	access to the [netlogon] share, or to grant users write permission 
	on the batch files in a secure environment, as this would allow 
	the batch files to be arbitrarily modified and security to be 
	breached.</para>

	<para>This option takes the standard substitutions, allowing you 
	to have separate logon scripts for each user or machine.</para>

	<para>This option is only useful if Samba is set up as a logon 
	server.</para>

	<para>Default: <emphasis>no logon script defined</emphasis></para>

	<para>Example: <command moreinfo="none">logon script = scripts\%U.bat</command></para>
</listitem>
</samba:parameter>