LDAP Have Field that contains building & room information. Can it be split out.

ekkehard
Contributor

In our LDAP directory we have Building and room information in one field separated by a common delimiter. Is there a way to split them out in my LDAP server configuration to split them into Building and Room fields for users?

4 REPLIES 4

ekkehard
Contributor

No takers?

mm2270
Legendary Contributor III

So, you have a single AD attribute that contains two values, and you want to map these in the LDAP mappings in the JSS to two separate items?
If so, I don't think there's a way to do that that I'm aware of. I believe the JSS LDAP mapping only allows you to map to an "attribute", so whatever that attribute pulls is what you'll see in the field it gets mapped to. You can't "process" it later with a script, for example, cut -d: -f1 or something like that.

The only two ways I can think of doing this is to
a) Not map that attribute at all, and use a script in your inventory collection that would grab that attribute, split it how you need into two variables, and then use a recon command to update the record using those variables.

b) You could use the Casper API to update a Mac's record with the information, again, from a script after you pull and process the attribute into two distinct variables.

These approaches are more or less the same other than the fact that the API route can be faster with a PUT command than doing a complete recon + upload.
Do either of those sound like something you'd be interested or able to do?

bentoms
Release Candidate Programs Tester

You can populate the JSS user information via a script.. I have an example below.

You could use this to submit what you want.. Splitting fields as needed.

http://macmule.com/2012/05/16/submit-user-information-from-ad-into-the-jss-at-login/

Obviously, adapt to your needs.

ekkehard
Contributor

Thanks bentoms.