Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Logon Script that writes to User's Active Directory Account in the description field not working for all users.

Posted on 2008-06-23
5
Medium Priority
?
738 Views
Last Modified: 2010-04-21
We have a logon script that is applied through a GPO that is supposed to take a user's logon name and the computer name that they logged on to and place that in the description field of the General Tab in each users AD account.  It does the same thing for the Computer Object (Description Field).  The problem that we are having is that the GPO is linked to an OU and only some of the users (in the same OU or container) are getting the description field updated when they logon.  The security filtering is set to authenticated users.  
Any ideas?
''POPULATES AD WITH USER LOGON INFO IN DESCRIPTION FIELD
 
Set objSysInfo = CreateObject("ADSystemInfo")
 
Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
Set objComputer = GetObject("LDAP://" & objSysInfo.ComputerName)
 
strMessage = objUser.CN & " logged on to " & objComputer.CN & " " & Now & "."
 
objUser.Description = strMessage
objUser.SetInfo
 
objComputer.Description = strMessage
objComputer.SetInfo

Open in new window

0
Comment
Question by:azstbzimms
  • 3
  • 2
5 Comments
 
LVL 17

Accepted Solution

by:
Jared Luker earned 2000 total points
ID: 21850165
That is a permissions issue.  If you are running a script in a gpo that runs when the user logs in, then that script will be running with the security of the user.  If they don't have rights to modify the description field of their user account or computer account, then they will not be able to update it.  That permission could be delegated to a doman group such as "domain users" or "authenticated users" but you will have to do that.  It is not set up that way by default.
0
 

Author Comment

by:azstbzimms
ID: 21850356
If I were to delgate domain users or authenticated users, then would it be possible for any user to change the description field of another user's account (using ADUC)?  Would it be better to delegate the group SELF?  I would think the worst case then would that a user could only write to thier own description field.  What do you think?
0
 
LVL 17

Expert Comment

by:Jared Luker
ID: 21850394
Agreed... if you can set it up that way it would be better.  I would not be concerned too much with users changing each others description though.  I don't image there are many with ADUC on their systems or would even know what to do with it even if they did.

That and the description gets overwritten every time someone gets logged in.
0
 

Author Comment

by:azstbzimms
ID: 21850479
Ok,  let me see if I can find the correct delagation option to make this happen and test it.
0
 

Author Closing Comment

by:azstbzimms
ID: 31469936
Thanks for your assistance!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Uncontrolled local administrators groups within any organization pose a huge security risk. Because these groups are locally managed it becomes difficult to audit and maintain them.
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question