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
730 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
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 …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

685 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