preexec

Richard Sharpe sharpe at ns.aus.com
Sun Jan 2 17:23:18 GMT 2000


At 02:54 PM 1/3/00 +1100, Tavis Barr wrote:
>
>I'm not sure if this is off-topic or not....
>
>I've set up a pre-exec script in smb.conf to put my motd out to my client 
>boxes when they log on:
>
> preexec = csh -c 'cat /etc/motd | /usr/local/samba/bin/smbclient \
>           -M %m -I %I' &
>
>It works fine (as long as the motd is under 1k), except that it executes 
>at least twice and sometimes more at each login.  Does anyone know what 
>might be going on?

A Windows 9x client actually connects to the netlogon share twice during
logon. Once for the netlogon script, and once for profile access.

This means that you must either write something that is idempotent or check
how many times you have been run.

>(I'm running the HEAD from about 6 months ago on Dec Unix 4.0F against 
>NT4sp5.  I'd be happy to send along my smb.conf if anyone wants it.)
>
>Thanks,
>Tavis
>
>
>
>--------------------------------------------------------
>
>Tavis Barr                           ,-~~-.___.        
>Senior Systems Coordinator          / |  '     \             
>Institute for Social and Economic  (  )        0               
>   Theory and Research              \_/-, ,----'            
>509E Int'l Affairs Bldg                ====           //                    
>Columbia University                   /  \-'~;    /~~~(O)
>212-854-4237                         /  __/~|   /       |    
>tavis at mahler.econ.columbia.edu     =(  _____| (_________|
>
>---------------------------------------------------------
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Regards
-------
Richard Sharpe, sharpe at ns.aus.com, Master Linux Administrator :-),
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course



More information about the samba-ntdom mailing list