Nexans,

Welcome to the board!

Can't you deactivate this "bad" user from User Manager or Active Directory Users and Computers?

If that is not the case...

code:
if @userid = "jdoe"
$RC = Shutdown("", "Sorry, you do not have access to this network!", 2, 1, 1)
endif

Or..
code:
if @userid = "jdoe" and @wksta = "machineid"
$RC = Shutdown("", "Sorry, you do not have access to this machine!", 2, 1, 1)
endif

If you are wanting this user to be able to login to your network, but not "surf" the Internet or the Network itself; these are Policies that really should be set by Microsoft's Policy Editor.

HTH,

- Kent

[ 13 May 2002, 07:51: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's