Posted on 05-24-2016 12:49 PM
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.
Posted on 05-24-2016 12:58 PM
Could you explain more precisely what you're looking for here?
Posted on 05-24-2016 01:03 PM
Are you trying to have the user info added to JSS?
Posted on 05-24-2016 01:31 PM
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.
Posted on 05-24-2016 01:41 PM
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?
Posted on 05-24-2016 01:44 PM
It appears that the field is called Comment in dscl
Posted on 05-25-2016 05:23 PM
Keep us posted if you find something. I could use that in my environment.
Posted on 05-26-2016 03:59 PM
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