Skip to main content
Question

Updating AD computer object with user login information


Forum|alt.badge.img+3

Does anyone have a login script that will update the computers AD object with username and a time stamp? My Mac scripting skills are not up to par.

7 replies

mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • May 24, 2016

Could you explain more precisely what you're looking for here?


Forum|alt.badge.img+1
  • New Contributor
  • 6 replies
  • May 24, 2016

Are you trying to have the user info added to JSS?


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 2 replies
  • May 24, 2016

On our Windows computers, when a user logs in a script runs that updates the AD computer object's Description field with the user's username, a time stamp, IP address and other information. We want to replicate that with our Macs.

I have been playing with the dscl command all day but can't seem to get it to update the computer objects description field.


mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • May 24, 2016

Hmm. I'm not sure you'll be able to get that to work. Although some people have been successful in updating fields in AD using dscl, its not really the tool for the job, so any success you have may be limited or short lived. I don't have much of a suggestion for you unfortunately, because we don't do anything like that. Personally, trying to modify AD records in a script run from a client system doesn't sound like a great idea to me.

But just for kicks, what is the exact field name or names that you're trying to make the changes to? I just looked at my own computer record in AD using dscl and I'm not seeing anything that looks like a description. is it a custom field?


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • 2 replies
  • May 24, 2016

It appears that the field is called Comment in dscl


Forum|alt.badge.img+1
  • New Contributor
  • 6 replies
  • May 26, 2016

Keep us posted if you find something. I could use that in my environment.


Forum|alt.badge.img+7
  • Contributor
  • 70 replies
  • May 26, 2016

As an alternative I have worked in schools where a login script appended the information to the end of a text file in a hidden share. Not the most secure option but worked well as it keep a history.

Regards
Graeme


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings