|
Hi all. A while back someone in our IT dept. created a group policy in which the Domain Users group is added to the Local Administrators group on any PC that you log into that belongs to our domain. This was done because there are some apps that require elevated priviliges. We are now looking at ways to remediate this security issue. A stop-gap measure is to disable that policy and have the actual user of a PC be in the local administrators group. At least that way not anyone who logs into a PC automatically has local admin privileges.
I was wondering if it would be possible to use kix to accomplish this task. We have an app that has an inventory of PC's and who uses what PC in a SQL database. I was wondering if a kix script could be used to access the database, compare the computer name of the PC on which the script is being run with the database, and when the computer name is found in the database (along with a username linked to that computer name) add that useranme to the loca admins group.
So I'm thinking the order this needs to be done via a kix script is as follows:
1 - Grab the compture name being logged into. 2 - Connect with a SQL database that has the computer names and associated user names. 3 - Compare that computer name with the data in the SQL database. 4 - If a match is found grab the user name associated with the computer name and add that user name to the local admins group.
Is something like that possible with a kix script? If so can you get me started because I don't know where to begin. I'm a bit of a kix scripting newbie...
|