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
727 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 500 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
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…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

863 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now