- BEGIN { FS=":" }
- {
- if ($3 > 99) {
- printf("dn: cn=%s,ou=People,ou=Entities,ou=SAM,dc=jones,dc=dk\n", $5);
- printf("objectclass: top\n");
- printf("objectclass: account\n");
- printf("objectclass: posixAccount\n");
- printf("objectclass: morrisonaccount\n");
- printf("objectclass: morrisonuser\n");
- printf("objectclass: person\n");
- printf("objectclass: organizationalPerson\n");
- printf("objectclass: inetOrgPerson\n");
- printf("objectclass: evolutionPerson\n");
- printf("objectclass: officePerson\n");
- printf("objectclass: mHybridPerson\n");
- printf("objectclass: morrisonperson\n");
- printf("cn: %s\n", $5);
- printf("sn: %s\n", substr($5, match($5, " ") + 1));
- printf("morrisonimallow: Y\n");
- } else {
- printf("dn: uid=%s,ou=System,ou=Entities,ou=SAM,dc=jones,dc=dk\n", $1);
- printf("objectclass: top\n");
- printf("objectclass: account\n");
- printf("objectclass: posixAccount\n");
- printf("objectclass: \n");
- }
- printf("uid: %s\n", $1);
- printf("uidNumber: %s\n", $4);
- printf("gidNumber: %s\n", $3);
- printf("userpasswd: {CRYPT}%s\n", $2);
- printf("gecos: %s\n", $5);
- printf("homeDirectory: %s\n", $6);
- printf("loginShell: %s\n", $7);
- printf("\n");
- }
- END {}
|