Accessing Drupal's Login Page After You Have Already Disabled The User Login Block
Thursday, September 27th, 2007Drupal is big on user community. By default, a fresh installation of Drupal plops a user login block in the left navigation column. But maybe you're just getting started with a new site and you don't want to look pretentious talking about "users" when in fact you are the only one using the site.
Well, turning off the user login block is easy. As with any block, you can disable it via Administer->Site Building->Blocks. However, once you've disabled the block for the general public, you will still want to log in. Now what?
To get a login page, browse to the root of your Drupal installation and add "?q=user" to the end of the URL:
http://www.somesite.com/?q=user
or
http://www.somesite.com/install_directory/?q=user
P.S. Here's to hoping that your site gets big enough that you want to turn the login box back on!!!










Receive posts via RSS
October 23rd, 2007 at 4:44 pm
Thanks. You’re a lifesaver. I was really worried when I realized I changed all my pages from published to unpublished and found out the login page I had created was something I needed.
October 23rd, 2007 at 7:32 pm
That freaked me out too! Glad I could help, Cliff!
January 19th, 2008 at 12:40 am
I knew I’d read about this somewhere, but when I tried to look it up at drupal.org and then Google it, I had a heck of a time finding this info.
May you get lots of traffic for writing this!
Cheers!
Margaret
March 17th, 2008 at 8:41 pm
Thank you for this tip.
April 8th, 2008 at 4:15 am
thank you very much!!!!!!
April 8th, 2008 at 7:46 am
Non c’รจ di che, Elisa!
July 7th, 2008 at 9:43 pm
This doesn’t seem to work if you have short URLs enabled. You’ll just get the generic “Page Not Found” error.
July 7th, 2008 at 9:58 pm
Hi, Chris.
If you have clean URLs enabled, you can use:
http://www.somesite.com/user
August 4th, 2008 at 5:14 pm
Hi, I just got drupal installed, and it is not allowing me to login as administrator. So basically, I am locked out of my own site. When I request a new password it still does not work, and I get the Page Not Found error. Help!
August 4th, 2008 at 5:17 pm
Hi, Jenny.
If you have database access, you can reset the password manually. The link below has a good discussion of how to do it.
http://drupal.org/node/32650
August 4th, 2008 at 5:34 pm
O, thank you soooooooooooooooooo much. Wow, I really appreciate it.
August 4th, 2008 at 6:32 pm
Hmmmm…it worked and then reverted. So I was able to edit and sign into my site as admin, and then when it kept requesting me to sign in again and again I went back to the database and the password was reset to the default. Everytime I try to change it again it just reverts back. Seems strange.
August 4th, 2008 at 7:47 pm
@Jenny That does seem pretty odd. Once you log in, try changing the password through the Drupal admin itself before doing anything else. If you already tried that, perhaps there is a module interfering?
I know the SMFforum module has caused problems for some people. From your first post, it sounds like this was a straight install but assuming it’s not maybe disabling more exotic modules might help.
Sorry if that sounds like a bit of a dodge. Not really sure what might cause the password to revert like that, especially if you changed it in the database by hand. You might want to post the question on the Drupal forum.
Also for those reading the thread, the SQL to update the password manually is:
UPDATE users SET pass = MD5(’new password’) WHERE uid = 1;
Obviously, you replace ‘new password’ with the password of your choice.