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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Mapping Drives using Group policy preferences Are you still using old scripts to map your network drives if so this article will show you how to get away for old scripts and move toward Group Policy Preference for mapping them. First things f…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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…

706 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

17 Experts available now in Live!

Get 1:1 Help Now