Friday 21 December 2012

How to Block Cuncurrent login session through GPO?

If you want to prevent users are login using their credentials in more than one system in your network, we can apply this below scripts VIA GPO to avoid the concurrent login sessions.
Ex
If User A is logged in SYSTEM1, he won’t be able to login another system at the same time, if he wish to login one more, then he should logoff his existing session.
GPO Settings
 
From the User Configuration\Windows Settings\Scripts\Logon and Longoff (Use the below scripts)

Logon Script
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Listing 1: Login.bat
:: BEGIN CALLOUT A
If Exist \\rafetpc\logons\%username%.txt Goto notlogon
Echo %username% logged in from %computername% > \\rafetpc\logons\%username%.txt
Echo %username% logged in from %computername% > \\rafetpc\logons\%computername%.txt
:: END CALLOUT A
Goto end
:notlogon
Logoff
:end
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Logoff Script
Listing 2: Logout.bat
:: BEGIN CALLOUT A
If Not Exist \\rafetpc\logons\%computername%.txt goto notlogon
Del \\rafetpc\logons\%username%.txt
Del \\rafetpc\logons\%computername%.txt
:: END CALLOUT A
Goto end
:notlogon
Logoff
:end
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Wednesday 23 May 2012

Disable USB Pendrive

We have lot of methods for Prevent the USB Pen drive in our network; I have been using this below method for Denying or Allowing some users for pen drive access in my network.
USB Storage drive will work based on these drivers
%SYSTEMROOT%\INF\USBSTORE.INF
%SYSTEMROOT%\INF\USBSTORE.PNF
So I have given rights to access this files using Group Policy
From the Group Policy
Computer Configuration
Windows Settings
Security Settings
File Systems
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
Create two Security Group
Like
 USB Allow & USB Denny
Prevent the USB driver files for USB Denny group.
Allow USB driver files for USB Allow group.