How can I create a user account which can logon to a domain and only be able to let the logon script run (netlogon) and then log out automatically? This user needs to be as restricted as possible.
What are the possibilities?
How can I create a user account which can logon to a domain and only be able to let the logon script run (netlogon) and then log out automatically? This user needs to be as restricted as possible.
What are the possibilities?
You could replace the user's default shell (explorer.exe
) with your script. In an AD domain you just set this registry key with Group Policy for the OU the user belongs to.
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
“Shell”=”C:\\Path\\To\\script.cmd”
It won't be a logon script anymore, but as soon as the script ends the user will be logged out. (Or you may need to logoff at the end of your script.)
There's no much need to limit privileges as the user hasn't any explorer.exe
provided interface to launch other programs. However, in order to prevent the user from launching Task Manager from Ctrl-Alt-Delete (and other processes from it), revise:
User Configuration > Policies > Administrative Templates > System > Ctrl+Alt+Del Options
Set at least Remove Task Manager to Enable
.