1 <samba:parameter xmlns:samba="http://samba.org/common">
2 <term><anchor id="PREEXEC"/>preexec (S)</term>
3 <listitem><para>This option specifies a command to be run whenever
4 the service is connected to. It takes the usual substitutions.</para>
6 <para>An interesting example is to send the users a welcome
7 message every time they log in. Maybe a message of the day? Here
10 <para><command moreinfo="none">preexec = csh -c 'echo \"Welcome to %S!\" |
11 /usr/local/samba/bin/smbclient -M %m -I %I' & </command></para>
13 <para>Of course, this could get annoying after a while :-)</para>
15 <para>See also <link linkend="PREEXECCLOSE"><parameter moreinfo="none">preexec close
16 </parameter></link> and <link linkend="POSTEXEC"><parameter moreinfo="none">postexec
17 </parameter></link>.</para>
19 <para>Default: <emphasis>none (no command executed)</emphasis></para>
20 <para>Example: <command moreinfo="none">preexec = echo \"%u connected to %S from %m
21 (%I)\" >> /tmp/log</command></para>