Drupal - `drush uli` generates correct link but results in 'Access Denied'
This can happen when the user is blocked. Setting the status to 1 in the Users table may resolve it.
Just ran across this in a local dev setup.. turned out to be the $cookie_domain
setting that was committed in settings.php
... if this is set to the production URL, you will not get a valid cookie, and therefore access will never be granted. Overriding $cookie_domain
to match the local dev environment in local-settings.php
did the trick!
Also check the flood table. Its possible there are records that are failed attempts by IP address that are blocking access.