Comments (9)
I'm sorry, but I cannot tell you anything about the configuration of your LDAP server. I am closing this because we have covered all of the issues that pertain to usage of the ldapjs library.
from node-ldapjs.
I think this is a duplicate of #865. Please use English for issue reports.
from node-ldapjs.
OK sorry. Even after performing the "duplicate" procedures I still get the error. I don't know where the error is
from node-ldapjs.
I do not understand what you mean by "the duplicate procedures". What changes did you make to the code sample you provided that still result in the error?
from node-ldapjs.
Sorry for the "duplicate procedures", it's just that I don't communicate very well using English, I made the change incorrectly, but now after making the change I get a new error.
He follows:
C:\Users\rayllan.souza\Desktop\ldapjs\node_modules\@ldapjs\dn\lib\utils\parse-string\read-attribute-value.js:34
throw Error('attribute value does not start with equals sign')
^
Error: attribute value does not start with equals sign
at readAttributeValue (C:\Users\rayllan.souza\Desktop\ldapjs\node_modules\@ldapjs\dn\lib\utils\parse-string\read-attribute-value.js:34:11)
at readAttributePair (C:\Users\rayllan.souza\Desktop\ldapjs\node_modules\@ldapjs\dn\lib\utils\parse-string\read-attribute-pair.js:62:27)
at parseString (C:\Users\rayllan.souza\Desktop\ldapjs\node_modules\@ldapjs\dn\lib\utils\parse-string\index.js:66:32)
at DN.fromString (C:\Users\rayllan.souza\Desktop\ldapjs\node_modules\@ldapjs\dn\lib\dn.js:331:18)
at ensureDN (C:\Users\rayllan.souza\Desktop\ldapjs\node_modules\ldapjs\lib\client\client.js:85:15)
at Client.modify (C:\Users\rayllan.souza\Desktop\ldapjs\node_modules\ldapjs\lib\client\client.js:473:13)
at C:\Users\rayllan.souza\Desktop\ldapjs\index.js:30:21
at Client.callbackWrapper (C:\Users\rayllan.souza\Desktop\ldapjs\node_modules\ldapjs\lib\client\client.js:296:5)
at Client.emit (node:events:511:28)
at Socket.onResult (C:\Users\rayllan.souza\Desktop\ldapjs\node_modules\ldapjs\lib\client\client.js:812:14)
Code:
return new Promise((resolve, reject) => {
try {
ldapClient.bind("usuarioADM", "senhaADM", err => {
if (err) {
reject(err);
}
ldapClient.modify(user, [
new ldap.Change({
operation: 'replace',
modification: {
type: "unicodePwd",
values: [encodePassword(newpassword)]
}
})
], (error) => {
if (error) {
reject(error);
} else {
resolve('Successfully password modified.');
}
});
})
}catch (error) {
console.error(error);
reject(error);
}
})
from node-ldapjs.
What is encodePassword
? Does it return a string? What is the value of user
? Is it a DN string pointing to the entity to be changed?
Please see
node-ldapjs/test/client.test.js
Lines 661 to 683 in f289008
from node-ldapjs.
What is encodePassword?
R: Yes, return string;
What is the value of user?
R: Yes, return cn=user
After checking the code you sent I was able to review some things I was doing wrong, but now I get the error "Invalid Credentials" on the bind method even with the correct username and password
from node-ldapjs.
Your example shows a simple username and password combination. Standard LDAP servers require the "username" be a DN string pointing to the user entity in the directory.
from node-ldapjs.
Ok, I added the correct line and the error is gone. Operations error only occurs now, can you tell me if it can be user permission in the domain? I'm trying to create a tool that resets the password of a third-party user, this user who has the name "reset" was given permission to change the password of other users only, he does not have administrator permissions.
from node-ldapjs.
Related Issues (20)
- replace operation --> modification must be an Attribute HOT 1
- ldapmodify works, but ldapjs client.modify() does't work as expected and return No Such Object HOT 5
- Unable to use attributes: 'member;range=0-1499' in ldapjs search HOT 3
- Support for SyncRequestControl HOT 1
- Not able to set password after user created HOT 3
- LDAP search return empty array for every subsequent search after the first search. HOT 1
- VError: Parser error for undefined:undefined: options.value must be a Buffer or Object HOT 18
- Support unicode DN HOT 8
- How can I obtain information indicating "Password Expired"? HOT 1
- Obtaining search entry attribute value by key HOT 1
- Invalidate Error
- Whitespace in (old) parseFilter causes `Uncaught Error: missing paren`
- Module build failed: UnhandledSchemeError: Reading from "node:util" is not handled by plugins (Unhandled scheme). HOT 4
- SASL / GSSAPI support HOT 3
- Open ssl issue with node 18 HOT 1
- Compatibility Issue Between ldapjs Library and FreeRADIUS HOT 1
- Edited: Ldapjs doesn't work after next.js build HOT 5
- Sharing unescape DN code for helper method
- (node:536) [LDAP_MESSAGE_DEP_001] LdapjsMessageWarning: messageID is deprecated. Use messageId instead. HOT 1
- Missing LDAP Result Codes in errors.js HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-ldapjs.