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
731 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
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 …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 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