I'm trying to get a preexec line to work on Profiles when a windows XP
system logs in. The line and script are the same as we used to use on the
"homes" share with WIndows 98 clients on samba 2. However I cannot
seem to
make the preexec line trigger either on login or by explicitly mounting the
share.
Here's the bit from my smb.conf
[Profiles]
path = /var/samba/profiles
preexec = /usr/local/samba/KEELE/logon %u %m %I
browseable = yes
guest ok = yes
read only = no
guest ok = yes
I've tried executing the script as the user and it seems to work fine so I
suspect there's a problem with the way samba is dealing with it. I've
also
run testparm to check it's seen the parameter and apart from renaming it as
"exec" it appears to be intact.
Here's the script
#!/bin/sh
#
#
# Logon script
echo "$*" > /tmp/log
/usr/local/samba/KEELE/mozilla-profile-setup >> /tmp/log 2>&1
--
______ jonathan@cs.keele.ac.uk Jonathan Knight,
/ Department of Computer Science
/ _ __ Telephone: +44 1782 583437 University of Keele, Keele,
(_/ (_) / / Fax : +44 1782 713082 Staffordshire. ST5 5BG. U.K.
Hi there,>#!/bin/sh ># ># ># Logon script > >echo "$*" > /tmp/log >/usr/local/samba/KEELE/mozilla-profile-setup >> /tmp/log 2>&1 >This looks odd to me. The file /tmp/log is almost certainyl owned by someone, and doesn'thave world writeable on it, so both lines in that script will fail before they can exec get executed. Unless, of course, you've already thought of that! If this _is_ your porblem, try using /tmp/log.$$ to generate a unique file name each time. Mac Assistant Systems Adminstrator @nibsc.ac.uk dmccann@nibsc.ac.uk Work: +44 1707 641565 Everything else: +44 7956 237670 (anytime)