Sometimes it’s not possible to login to Magento Admin Panel.
Searching for a solution can be very frustrating.
One of the most common purposes for this is a wrong configuration of the cookie domains.
Another problem is that Magento searches for a dot in the hostname.
Also wrong directory permission can cause this issue.
To prevent manually checks you can use the sys:check command bundled with n98-magerun.
All the sys:check commands are created by netz98 employees who had the same problems over the last month.
You can trigger the sys:check with a simple call.
The output will now check the settings.
If you have configured i.e. a wrong cookie domain you should see an output like this:
I hope our command can help you to prevent this issues.