Sponsored Content
The Lounge What is on Your Mind? The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Wolf Machowitsch Post 303028576 by bakunin on Thursday 10th of January 2019 03:36:29 PM
Old 01-10-2019
Groucho Marx once said (The Groucho Letters) "I don't care to belong to any club that will have me as a member", but this Wizards Club is an exception. Thank you for all the congratulations. I will try to live up to these expectations.

Wolf
These 2 Users Gave Thanks to bakunin For This Post:
 

7 More Discussions You Might Find Interesting

1. What is on Your Mind?

Four More UNIX.COM Achievement Award Badges to Award

Happy New Year! There are currently four UNIX.COM achievement awards up for grabs, as the say. Here they are, in no particular order: The Order of the Raven The Order of the Hippo The Order of the Spider The Order of the Dragon Don't ask me what they mean, or who who will get those... (0 Replies)
Discussion started by: Neo
0 Replies

2. What is on Your Mind?

The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Corona688

Congrats to Corona688 for a much deserved and long overdue lifetime achievement award badge from UNIX.COM in computer wizardry: "The Order of the Wizard's Hat - Lifetime Achievement Award" This "Order of the Wizard's Hat" is presented to Corona688 in 2019 for UNIX Wizardry and his continued... (6 Replies)
Discussion started by: Neo
6 Replies

3. What is on Your Mind?

The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Wisecracker

Congrats to wisecracker for the first lifetime achievement award badge from UNIX.COM in computer wizardry: "The Order of the Wizard's Hat - Lifetime Achievement Award" The first "Order of the Wizard's Hat" is presented to wisecracker in 2019 for RF Electronics Engineering and Computer... (6 Replies)
Discussion started by: Neo
6 Replies

4. What is on Your Mind?

The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to RudiC

Please join me in congratulating RudiC for his long overdue lifetime achievement award badge from UNIX.COM in computer wizardry: "The Order of the Wizard's Hat - Lifetime Achievement Award" This "Order of the Wizard's Hat" is presented to RudiC for Computer Wizardry in the UNIX Operating... (10 Replies)
Discussion started by: Neo
10 Replies

5. What is on Your Mind?

The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Scrutinizer

Please join me in congratulating Scrutinizer for his long overdue lifetime achievement award badge from UNIX.COM in computer wizardry: "The Order of the Wizard's Hat - Lifetime Achievement Award" This "Order of the Wizard's Hat" is presented to Scrutinizer for Computer Wizardry in the UNIX... (7 Replies)
Discussion started by: Neo
7 Replies

6. What is on Your Mind?

Poster of the Year 2019 Award Announcement and Call for Nominations

Dear All, I am pleased to post that I am announcing a new award, "Poster of the Year 2019" and calling for your nominations (privately to me). This is a new award and I plan to announce the winner for this year (2019) in January 2020. The prizes will be (still working out the details): ... (0 Replies)
Discussion started by: Neo
0 Replies

7. What is on Your Mind?

Moderator of the Year 2019 Award Announcement Only

Dear All, We are happy to post that I will be announcing soon my award for "Moderator of the Year 2019". This is a new award which I plan to announce in December of each year, starting this year (2019). The prizes will be (still working out the details): A Moderator of the Year... (3 Replies)
Discussion started by: Neo
3 Replies
LDAP_MODIFY_BATCH(3)							 1						      LDAP_MODIFY_BATCH(3)

ldap_modify_batch - Batch and execute modifications on an LDAP entry

SYNOPSIS
bool ldap_modify_batch (resource $link_identifier, string $dn, array $entry) DESCRIPTION
Modifies an existing entry in the LDAP directory. Allows detailed specification of the modifications to perform. PARAMETERS
o $link_identifier - An LDAP link identifier, returned by ldap_connect(3). o $dn - The distinguished name of an LDAP entity. o $entry - An array that specifies the modifications to make. Each entry in this array is an associative array with two or three keys: attrib maps to the name of the attribute to modify, modtype maps to the type of modification to perform, and (depending on the type of modification) values maps to an array of attribute values relevant to the modification. Possible values for modtype include: o LDAP_MODIFY_BATCH_ADD - Each value specified through values is added (as an additional value) to the attribute named by attrib. o LDAP_MODIFY_BATCH_REMOVE - Each value specified through values is removed from the attribute named by attrib. Any value of the attribute not contained in the values array will remain untouched. o LDAP_MODIFY_BATCH_REMOVE_ALL - All values are removed from the attribute named by attrib. A values entry must not be pro- vided. o LDAP_MODIFY_BATCH_REPLACE - All current values of the attribute named by attrib are replaced with the values specified through values. Note that any value for attrib must be a string, any value for values must be an array of strings, and any value for modtype must be one of the LDAP_MODIFY_BATCH_* constants listed above. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Add a telephone number to a contact <?php $dn = "cn=John Smith,ou=Wizards,dc=example,dc=com"; $modifs = [ [ "attrib" => "telephoneNumber", "modtype" => LDAP_MODIFY_BATCH_ADD, "values" => ["+1 555 555 1717"], ], ]; ldap_modify_batch($connection, $dn, $modifs); ?> Example #2 Rename a user <?php $dn = "cn=John Smith,ou=Wizards,dc=example,dc=com"; $modifs = [ [ "attrib" => "sn", "modtype" => LDAP_MODIFY_BATCH_REPLACE, "values" => ["Smith-Jones"], ], [ "attrib" => "givenName", "modtype" => LDAP_MODIFY_BATCH_REPLACE, "values" => ["Jack"], ], ]; ldap_modify_batch($connection, $dn, $modifs); ldap_rename($connection, $dn, "cn=Jack Smith-Jones", NULL, TRUE); ?> Example #3 Add two e-mail addresses to a user <?php $dn = "cn=Jack Smith-Jones,ou=Wizards,dc=example,dc=com"; $modifs = [ [ "attrib" => "mail", "modtype" => LDAP_MODIFY_BATCH_ADD, "values" => [ "jack.smith@example.com", "jack.smith-jones@example.com", ], ], ]; ldap_modify_batch($connection, $dn, $modifs); ?> Example #4 Change a user's password <?php $dn = "cn=Jack Smith-Jones,ou=Wizards,dc=example,dc=com"; $modifs = [ [ "attrib" => "userPassword", "modtype" => LDAP_MODIFY_BATCH_REMOVE, "values" => ["Tr0ub4dor&3"], ], [ "attrib" => "userPassword", "modtype" => LDAP_MODIFY_BATCH_ADD, "values" => ["correct horse battery staple"], ], ]; ldap_modify_batch($connection, $dn, $modifs); ?> Example #5 Change a user's password (Active Directory) <?php function adifyPw($pw) { return iconv("UTF-8", "UTF-16LE", '"' . $pw . '"'); } $dn = "cn=Jack Smith-Jones,ou=Wizards,dc=ad,dc=example,dc=com"; $modifs = [ [ "attrib" => "unicodePwd", "modtype" => LDAP_MODIFY_BATCH_REMOVE, "values" => [adifyPw("Tr0ub4dor&3")], ], [ "attrib" => "unicodePwd", "modtype" => LDAP_MODIFY_BATCH_ADD, "values" => [adifyPw("correct horse battery staple")], ], ]; ldap_modify_batch($connection, $dn, $modifs); PHP Documentation Group LDAP_MODIFY_BATCH(3)
All times are GMT -4. The time now is 10:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy