I want to use LDAP user's credential in one of my Linux scripts, in which I want to take user name and password and want to test the authentication.
I have used ldapsearch command to check the user's name validation and now want to check the same for the password.
Is there any command I can use to check this?
For clarification, are you looking to take a username and password as input from the user in your script and test them against an LDAP server? If that's the case, you could try authenticating against the LDAP server with the username/password and just see if it works.
Related
I'm creating a Express.js REST server that can invoke and query chaincodes (similar to the JavaScript fabcar example). I'm wondering how would I register, enroll, and use a network user that is based on a username and password, so that I could allow the user to login using their username and password and can invoke chaincodes with their network user.
Please tell me if I'm going about this the wrong way, or if there are configs to achieve this.
I have configured liferay to authenticated to OpenLdap. Cas, import and export is activated.
User create from OpenLdap can authenticate to portal, also is imported into Liferay. It seems importing process is ok.
When user try to modify an attribute other than password the data is modified on OpenLdap.
The problem is when user try to modify their password. Liferay ask for current pass and the new one. It get a error saying credentials an incorrect.
If i try to modify the password of the user with a administrator user, Liferay only ask for the new password. After that, the user with de password changed by de admin user can log in with the new password. So, it seems password is modified correctly on OpenLdap. If user, try to modify again the password, Liferay say that everything was ok, but the user cannot autenticate with the new passord, only with old password.
After that if I try to change de password again with admin user, Liferay say that everthing was ok but the user now cannot authenticate with new password.
I'm using Liferay 6.2 ce.
I have modified :
ldap.auth.method=password-compare
ldap.auth.password.encryption.algorithm=SHA
ldap.auth.method=bind
on portal-setup-wizard.propertiesenter code here
Any Idea?
Thanks very much in advance.
with several values without success.
Compare is not a best practice for LDAP in general.
"Bind is preferred by most vendors so that you don't have to worry about encryption strategies."
Also there appears to be a bug in LifeRay that may affect your version.
I have only ssh access to machine where I need to setup the Archiva. So i wonder have can I create a admin account and set a password to that account.
I found in Archiva API /userService/createAdminUser but still I don't understand how to add a password to the user that will be created by this API request.
Or maybe you can help me with another solution?
The user format is defined here: http://archiva.apache.org/docs/2.0.1/rest-docs-redback-rest-api/el_ns0_user.html (the api accept both json and xml)
NOTE: you won't be able to use this api#method if the admin user already exists!
I have a question about Liferay.
I have configuate my system with Liferay + Jasig CAS Authentication and OpenLDAP.
I can authenticate my user correctly and I can import user account from LDAP (Ldap import).
I have also configurate the user export to OpenLDAP..so, now I can export an account when this will be create.
Infact I can see this new account in my OpenLDAP server.
When Liferay create a new account it generate a random password for this new account (for example 4hdsdsh) and the user receive an e-mail after the registration.
The problem is: I my OpenLDAP server this password does not seem to be equal to the one just generated by Liferay..
So, the new user will never be able to authenticate into my Liferay (because I use CAS + LDAP).
I also found a funny/strange thing: If I modify this new password in Liferay (using an administrator account) I see this password correctly into my OpenLDAP server and so, the user can finally log into my Liferay..
I am not sure but it seems while user registration it is just exporting the fields entered by user in registration screen and since the password is auto generated after registration, it is not exported to LDAP and might be blank till User has not updated his password by Logging in.
You can debug this class PortalLDAPExporterImpl.Java and also watch user detail in LDAP via jxplorer whats the password & user status as well. If password is blank you could extend class and your logic to pass auto generated or default password for first time case.
This is a bug of Liferay:
See following issue: https://issues.liferay.com/browse/LPS-43045
I have an LDAP error in c# code talking about an invalid customers username / password.
I need to confirm if the password is in fact correct, or the way I have manipulated the users DN to remove the escape characters has caused the user to be unknown.
I'm not that familiar with domains and how that fits in with windows, but I have access to some free LDAP browsers e.g. http://www.ldapbrowser.com/ or can download some other software but I need to validate a password with it somehow.
Any ideas how?
The "ldapbrowser" should work.
We prefer the http://directory.apache.org/studio/
What is the error code?
I assume you are using AD?
We also have some help with AD and LDAP
See my reply to the following thread:
LDAP - How to check a username/password combination?
If you need to only verify username and password, The LDAPWhoAmI Extended Operation will work (either in a custom test script, or via the dedicated binary 'ldapwhoami').
I hope this helps...
Max