Closed luisfran10 closed 10 months ago
I'm trying to change a user password, but the changing object throw this message:
"Error: modification must be an Attribute"
//entry example #1 const entry = { type: 'userPassword', values: Buffer.from("${newPassword}", 'utf8'),};
"${newPassword}"
//entry example #2 const entry = { userPassword: Buffer.from("${newPassword}", 'utf16le')};
const change = new Change({ operation: 'replace', modification: entry, }); client.modify( `${[this.seachAttribute]}=${user}`, change, (error: any) => { if (error) { Logger.log('modify error:', error.message); reject(error); } resolve(this); }, );
Duplicate #859. Solution is noted in https://github.com/ldapjs/node-ldapjs/releases/tag/v3.0.0
I'm trying to change a user password, but the changing object throw this message:
"Error: modification must be an Attribute"
//entry example #1 const entry = { type: 'userPassword', values: Buffer.from(
"${newPassword}"
, 'utf8'),};//entry example #2 const entry = { userPassword: Buffer.from(
"${newPassword}"
, 'utf16le')};