[Samba] Samba logoff script

Dennis McLeod dmcleod at foranyauto.com
Tue Jan 22 00:01:03 GMT 2008


If you are using xp clients, you can call a logoff script using local group
policy (or a logon script for that matter, if you have machines that are not
part of the domain yet, like I do...).

As part of your logon script import a registry key to set the logoff script.

Command: regedit.exe /s %logondrive%\logoff.reg

(%logondrive% being set as \\server\netlogon\scripts as part of my logon
script. )


Here's mine (named logoff.reg):

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Scripts]

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Scripts\Logoff
]

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Scripts\Logoff
\0]
"GPO-ID"="LocalGPO"
"SOM-ID"="Local"
"FileSysPath"="C:\\WINDOWS\\System32\\GroupPolicy\\User"
"DisplayName"="Local Group Policy"
"GPOName"="Local Group Policy"

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System\Scripts\Logoff
\0\0]
"Script"="logoff.bat"
"Parameters"=""
"ExecTime"=hex(b):00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

As part of your logon script copy the logoff.bat (or whatever you choose to
use), to the indicated location.
In this case: C:\WINDOWS\System32\GroupPolicy\User (the double slashes are
required above, but not here...)


Here's my logoff.bat:

CALL \\server\netlogon\scripts\logoff1.bat

Which is where I change whatever I want it to do at logoff....


If your not on XP, well, I think you can do it on W2K, the registry import
is a little different.
I am NOT any good at batch files or scripting.... Just the basic stuff. But
it works for me.
 









-----Original Message-----
From: samba-bounces+dmcleod=foranyauto.com at lists.samba.org
[mailto:samba-bounces+dmcleod=foranyauto.com at lists.samba.org] On Behalf Of
Andy
Sent: Sunday, January 20, 2008 9:18 PM
To: samba at lists.samba.org
Subject: [Samba] Samba logoff script

Hello

Is it possible to create a samba logoff script. I currently use netlogon for
a logonscript. I also want a logoff scipt to allow me to back certain files
up once a user logs off.

Is this possible? If so how?

--
REGARDS,
Andy
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba



More information about the samba mailing list