Adolfo
(Fresh Scripter)
2007-09-27 09:13 PM
Changing the user’s access level in their workstations

Hi all

How can I change the user’s access level in their workstations from administrator to restricted user with KiXtart logon script

Thanks.


Mart
(KiX Supporter)
2007-09-27 09:18 PM
Re: Changing the user’s access level in their workstations

This is about local users right?

Usually you could just remove them from the local admin group.
I'm not sure and cannot test right now but I guess that would be enough to get the radio button in control panel set.

[edit]
Just did a manual test (create a user and remove it from local admin group) and it seems to do the trick.
[/edit]


Witto
(MM club member)
2007-09-27 09:33 PM
Re: Changing the user’s access level in their workstations

Something like this, but converted to KiX?
Remove Domain Users from Local Administrators group
I think the script would start like this.
 Code:
If InGroup(@WKSTA+"\Administrators")
	;code to remove user from local admin group
EndIf


Mart
(KiX Supporter)
2007-09-27 09:41 PM
Re: Changing the user’s access level in their workstations

And the part doing the work could be like this.

 Code:
Shell '%comspec% /c net localgroup administrators accounttoremovegoeshere /delete'


Adolfo
(Fresh Scripter)
2007-09-27 09:57 PM
Re: Changing the user’s access level in their workstations

Thanks that works fine.

Witto
(MM club member)
2007-09-27 11:18 PM
Re: Changing the user’s access level in their workstations

The "accounttoremovegoeshere", is that @USERID?
 Code:
Shell '%comspec% /c net localgroup administrators ' + @DOMAIN + '\' + @USERID + ' /delete'