[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Script for mass updates



hello, my answers below:

2017-02-02 1:27 GMT+04:00 Ralf Mattes <rm@mh-freiburg.de>:

Am Mittwoch, 01. Februar 2017 19:21 CET, Jephte Clain <jephte.clain@univ-reunion.fr> schrieb:

> hello,
>
> he asked for a quick and dirty way with bash, so that's what I gave him.

Sorry, but the OP did _not_ ask for a "quick and dirty" solution, he asked for an
existing script. "Quick and dirty" is not what you want as a system administrator.

I fail to see why "urgently needed" and "bash script" does not qualify as "quick and dirty" but you have a point: "quick and dirty" is not usually what we do as sysadmins

I have to admit I like very much the fact that the knowledgeable people (including you) on this list always give quality answers and resist the urge of "quick and dirty you just have to copy/paste and not think about it"


> however, I'm curious: can you give me an example of input my script can't
> handle?

Yes, of course.
- It will fail as soon as the value of the cn attribute doesn't fit in a single
  line (happens more often than you might expect).
try it, it will not fail 
- It wil fail for entries with more than one cn attribute, generating more
  than one displayName attribute per entry.
you are right: I forgot that displayName is monovalued and cn is multivalued. that is a valid point
I was mistaked by the fact that we use the SUPANN norm that requires to use cn as a monovalued attribute.

The main point is obviously "avoid quick and dirty", and I want to say thank you for that

regards,
Jephté


Cheers, Ralf Mattes








--
Jephté CLAIN | Développeur, Intégrateur d'applications
Service Système d'Information
Direction des Systèmes d'Information
Tél: +262 262 93 86 31 || Gsm: +262 692 29 58 24