forgot the moodle admin password of my local moodleyour text server
i am using the version 4.1 moodle
i know the username but unfortunetly forgot the password my local moodle server.
i have tried to forgot the password i havent give the smtp address so i cant recieve the mail of reset password
enter image description here
login to moodle server but
i have forgot the passwqord so i am not able to login
You can reset the password from the command line
php admin/cli/reset_password.php --username=admin --password=newpassword
Here is a more hacky approach that works provided you have access to the database.
For context, Moodle uses the PHP function password_hash() to generate a password hash for users. The basic idea is that you want to use this function in a plain PHP file outside of Moodle to output a password hash of a new password. This hash is then manually saved in the password field in your mdl_user table using your database client and your new password used to login to the site.
PHP File:
<?php
echo password_hash("new_password", PASSWORD_DEFAULT);
Example output of password_hash:
$2y$10$NCC4PVZ1kTRg4bT21yEl2eUVWMf3lkbYtczTn8vB53qNwTqtN9jwS
Related
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.
I need to reset a wordpress Password via PHP My Admin. I already tried MD5, and I also tried to upload a PHP file to the base directory and use the wp_has_password() Function and i tried http://www.passwordtool.hu/wordpress-password-hash-generator-v3-v4 - but non is working - how can i encrypt a password via PHPMyAdmin?
Cheers
Please view the image and set md5 password
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 am developing a WPF application with SQL Server 2014.
In our server side, I have created SQL Login as
CREATE LOGIN <username> WITH PASSWORD = <oldPassword> MUST_CHANGE,CHECK_EXPIRATION=ON,CHECK_POLICY=ON, DEFAULT_DATABASE =<databaseName> DEFAULT_LANGUAGE=[English]
Now after changing the password of above user by
ALTER LOGIN <username> WITH PASSWORD = <newPassword> , OLD_PASSWORD =<oldPassword> , DEFAULT_DATABASE=<databaseName>, DEFAULT_LANGUAGE=[English]
I am able to open this connection with Old Password and new password both (by using VS2013 C# connection string ). Condition : It will work only till we restart our server or service.
As per the requirement, user should be able to login only with new password. Can this community help me.
Do we have some restriction in SQL to open connection/login only with New Password.
Thanks in Advance.
Try adding this to your command when changing the password.
OLD_PASSWORD = 'oldpassword'
I think you might just be adding another password rather than replacing it with your current command.
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