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