[Samba] Login and logout scripts
Charles Marcus
CMarcus at Media-Brokers.com
Wed Jan 24 13:01:23 GMT 2007
> If you are just using a samba server as the PDC with no MS Windows
> domain controller then yes you can have login scripts.
>
> You can also use group membership comparisons within the login script
> using a windows tool called ifmember.exe. Both the vbs/bat files and
> ifmember.exe go /etc/netlogon.
Correction: it is ISMEMBER.EXE, not ifmember.exe.
You can also use something called OSVER.EXE to determine the Windows OS
version, if you want to run different commands for different OS versions.
I had to do things a little differently to get this to work right on my
windows 2000 domain. I had to copy the ISMEMBER.EXE files to the local
computer, running them directly from the script did not work. So I added
a test to the batch file to look for the existence of the files
(ISMEMBER.EXE and OSVER.EXE), which copies them to the local computer if
they are not there. I didn't try changing it when I converted, so Pauls
suggestion might work just fine.
This also allowed me to put the files in a different location (not the
NETLOGON share):
<begin snippet>
if exist C:\WINDOWS\system32\ISMEMBER.EXE goto map-home
if exist y: net use y: /del
net use y: \\myserver\installers /persistent:no
copy y:\free\ISMEMBER.EXE c:\WINDOWS\system32\
copy y:\free\OSVER.EXE c:\WINDOWS\system32\
:map-home
if exist y: net use y: /del
whatever you want for the rest of the commands here
<end snippet>
hth...
--
Best regards,
Charles
More information about the samba
mailing list