I have a GPO in place that runs login / logoff scripts successfully for most users to update user descriptions to their computer names. This works for all users except for one, the error the user receives is
Line:14
Char:1
Error: Access is denied
Code: 80070005
Source: Active directory.
Line 14 of the script contains: objUser.SetInfo
The GPO permissions allow for "Read" for Authenticated users.
The error itself appears to be a generic permission issue, but the user getting the error should still be an "authenticated user" by being able to log on to Active Directory (correct me if I'm wrong). The only thing out of the ordinary with the user in question is that he is a member of up to 6 groups, with Domain Users being the primary Group. Looking for guidance in troubleshooting this.
Option Explicit
Const ADS_PROPERTY_UPDATE = 2
Dim objSysInfo, objUser, objNetwork, strComputer, strDescription
Set objSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
Set objNetwork = CreateObject("Wscript.Network")
strComputer = objNetwork.ComputerName
strDescription = "Logged on " & strComputer & " on " & Date
objUser.Put "description", strDescription
objUser.SetInfo
objUser.SetInfo
. The rest of the script might help, but the obvious next step would be verifying that the user in question has access to the object and action in question. What's the script doing, trying to set an attribute on the user object? Make sure the user has modify rights to its own attributes, or at least the one(s) at bar.