Is it possible to change Drupal8 admin password using Drush? - drupal

Is it possible to change Drupal8 admin password using Drush? Or fetch the password in any other way.
I have forgot the administrator password for the local Site. I can access the database and also able to access the user related table. As in my localhost there is no smtp server setup I am unable to get email using forget password.
If anyone have any idea to fetch the password or reset it, thus I could able to use the password. Please let me help with your valuable suggestions.

On Drupal 8 you can do this :
drush upwd my_username my_password
# drush upwd admin 123456

I had tried several time the flood table got several records and blocked the user.
To clear the data and unblock the user I have used the following drush command
drush sqlq "DELETE FROM flood"
Then I had run the following command to reset password
drush upwd --password="mypassword" "admin"
After that I was able to login into the site.
I got some help from drupal community and the following post Recovering the administrator password

i know you found a solution to your issue but for future reference and anyone else that may stumble upon this. Drush can provide a one time login for superuser.
drush uli
after that you can copy and paste the link into your browser.
documentation here: https://drushcommands.com/drush-8x/user/user-login/

Related

wp admin user name has been changed by someone

As a Administrator of my website (Wordpress with Woocommerce), I am unable to logged in on my website's wp-admin panel. Then I tried to log in from another user name and it got successfully logged me in, then I saw the name of my admin user has been changed. I am amazed how it was happened? who did it? and why ?
Please suggest me what should i do ?
How to avoid such incident again ?
Incase the culprit who did it, In the next attempt, if he/she changes name of my second user of wordpress, what i should do ?
I am afraid if the culprit change the names of my all wp users then what should i do?
It seems a hacking attack.
So I suggest you first , upgrade your plugins and themes.
Then don't forget to scan your whole site with wordfence.
Then secure it with wordfence , I suggest to use it's pro version, I really feel it useful.
Then tell your hosting to scan and make sure no security issue there.
Note : Don't forget to remove your ftp and extra admin or change their password at least.
Your task is done ..
Still confusion, consult with an expert like me.
Block or delete the mentioned admin account
Install a security plugin like Wordfence
Scan your whole site (with the plugin), it's very likely a backdoor has been installed for future attacs
Change all passwords of admin-accounts and advice your users to do the same
Change the passwords of your FTP, database and possible webserver-interface (if the username was changed, it's likely done directly inside the database)

Login Prompt is Lost in Drupal. So is there a way to by pass it?

I am having some issues with my Drupal 7.
Because of a different bug I am having with component or panel, one that is taking over pages and hiding other parts of a page somehow, my login page has been corrupted.
what is supposed to be my /user and/or user/login page looks completely as it should not look. The username and password prompt and input fields are missing because of a component which needs to be removed. This component has somehow managed to cover or hide the thing I need.
The bug that has caused this problem is beyond the scope of this post but I believe that it is probably a requirement to log into the admin panel in order to fix the issue.
How do I log in if I can not get the login prompt page to come up as it should?
drush
You can request a one time login link for any user account using the drush command user-login :
drush user-login <uid|username|email>
It's aliased uli and default to 1 (admin), the following has probably saved millions of drupal devs ;) :
drush uli
Services module
You can also login "RESTFully" via cURL or equivalent by submitting a POST request to the appropriated endpoint without loading the form. You just need the services module.
Login remotely to Drupal 7 site using services
Authenticated Request with cURL

Not able to log into wordpress website.... self hosting on Azure

When I try to sign into my websites wp-admin login screen it refreshes and redirects me to the login page. After researching this issue it looks like deactivating the plugins should fix the issue. However, when I try doing this from phpmyAdmin, it tells me that the UPDATE command is denied to user.
I have tried using the FTP client 'Fire FTP' to try and access my files but I do not know which username and password needs to be used (I have about a million at this point).
Is there somewhere in the Azure portal where I can edit my files and deactivate the plugins?
Other information: I accidentally deleted the file the had my Wordpress admin password, but I am able to log into Azure, and phpmyAdmin. I also have my cPanel login information but I cannot figure out how to access that either. I am also using a Mac.
Please help! I have a basic understanding of web development but not much and I have worked incredibly hard on my website business but this has been a rough setback.
Looking at your problem, FTP is your best option. You can define the user/password at the portal in your app service blade:
Login into the portal: https://portal.azure.com
Navigate to your app service blade
Look for Deployment Credentials and set your username/password.
I was able to resolve this. Turns out I had exceeded my database storage. Simply upgrading my plan fixed the issue. So if anyone sees this and has the same problem, make sue that your SQL db has enough storage available.
The plugins made me exceed my storage but I did not need to deactivate them.

Drupal account registration

I have installed Drupal 7.42 and am using it with Xampp server with PHP version 5.5.27 and server version 5.6.25. I want to access the Drupal admin page or dashboard but I can't because when I create a new account it asks me to select a username and then asks for my email. I provide both of these and then get a message saying that I should check my mail for further instructions to activate the account.
The problem is I am not getting any such mail even after several attempts. My junk folder too has nothing in it. Please help me to resolve this issue.
Thank you.
See in database the table users and follow this post Recovering the administrator password

Why can't I access my Drupal6 admin or pages?

I am reactivating an old Drupal project that was created by a past employee. He left no instructions on how to access Drupal. I gained access to the postgres database Drupal is using and changed everyone's password. I also made sure all users had administrator role and that administrator role has all permissions. When I log in with any of the users, I simply get "Access denied" for every page I try to go to. I've tried /admin, /user, /node, and several other pages. Changing the password definitely reset their password because I'm not getting an invalid login message, just an access denied message. The site is first being authenticated through apache using LDAP, and I made sure there are apache users that match the Drupal users. I am totally stumped. As I said, the person who did this project initially is gone and can't be reached. I have looked at several similar topic threads and can't figure this out.
have you enabled the ldap mod in apache?
try /?q=user
is phpMyAdmin installed? Check users there as well.

Resources