I dont like it if ppl know how to get to the login page if my website dosent need one, and i dont want ppl trying to guess acounts and passwords all day :) so i want to know if i can and how, the path module dosent help coz it wont rename it or delete it. Thank you !

Comments

vincent sg’s picture

Disable user registration
Administer -> User management -> User settings
Under "User registration settings" and "Public registrations", select "Only site administrators can create new user accounts"
Save

Remove user block
Administer -> Site building -> Blocks
Drag the user block down.
Save

Access login page
http://www.example.com/user
or
http://www.example.com/?q=user

ciobulus’s picture

you didnt understand, i know how to remove it visualy but i want to rename the www.example.com/user path to www.example.com/youdontknowthepathsoucantlogin so only i and the other website admins will know that path. People see a theme and say ALLRIGHT THIS IS DRUPAL lets mess with it searching for exploits and stuff like that and sometimes they find some :) my reasons are irelevant. Thank you !

Gaperville’s picture

I'm attempting to do the same thing. I'm surprised this is not an easy task by now. Thanks.

WorldFallz’s picture

Please don't post duplicate threads. Thanks.

ciobulus’s picture

i searched for this 2 houers and didnt find anything so its not a repost if people understand whats the issue here i know how to disable blocks and forbid new acount regs. I want the www.example.com/user path link page whatever u call it renamed to something of my choseing example : www.example.com/u53r

WorldFallz’s picture

Then you can bump your thread. Posting duplicates just fragments people's efforts to assist you, clogs up the forums with duplicate content, and makes it harder for anyone else searching on the topic in the future.

ciobulus’s picture

guess that not a lot of ppl know the answer to this issue :) might be harder than i tought

WorldFallz’s picture

I just don't think it's very important: http://drupal.org/security/secure-configuration. But you should be able to do it with some apache rewrite foo.

Anonymous’s picture

It's very important: my client's shared hosting has a built-in /user path which redirects to their webmail. Ergo, I can't login to Drupal! And there's NO way of changing the path. I tried custom_url overrides in settings.php, but that still redirects me to the user/webmail path.

What to do? Change the user module name entirely? But it's not an "optional" module, so how to disable / re-enable it?

Very frustrating.

WorldFallz’s picture

host takeover of any paths is really poor configuration (and bad behavior) on their part. that said however, I'm not sure what you can do-- renaming the user module will have no effect-- the menu callbacks are in the module code itself. Moreover, there's probably other core and contributed module dependencies on the core user path.

Anonymous’s picture

Thanks for the answer. I'm thinking of switching hosts. Their loss...

andrew.eatherington@gmail.com’s picture

I have come across sites that are obviously built in Drupal but don't have the user path. Unless they have been hacked to change the path, there must be a way?

a6hiji7’s picture

I to want to do this i.e. change the path to user pages. Does anyone know a way?

elsvandeveire’s picture

I think this is a very interesting question indeed (for various privacy reasons) and I haven't found any answers so far.

So how do you change the login path, e.g.

www.mywebsite.com/user

to

www.mywebsite.com/secretlink

?

There must be a way!

Thanks for your helpful answers.

ParisLiakos’s picture

Did anyone tried google??

http://groups.drupal.org/node/20925

I just did this and works perfectly

Gaperville’s picture

Did you use the older code for this, or did you use a newer one? It's from a much older date. Thanks.

doxwrx’s picture

Here is a link to a great solution that actually works.
http://drupal.org/project/rename_admin_paths

The module on the page is for Drupal 7. However, there is also a function on the page for Drupal 6 users which can be inserted into your settings.php file. I needed a solution for D6 and the code given on the page worked great for one change (i.e. mysite.com/user). I wanted to change two paths, for user and for admin. It was necessary to modify the code a bit. This worked very well and I am including the code here...hoping it will help someone out.

/* admin and user path change */
function custom_url_rewrite_outbound(&$path, &$options, $original_path) {
    if (preg_match('|^user(?![^/])(.*)|', $path, $matches)) {
        $path = 'something'. $matches[1];
    }
	if (preg_match('|^admin(?![^/])(.*)|', $path, $matches)) {
        $path = 'something-else'. $matches[1];
    }
}

function custom_url_rewrite_inbound(&$result, $path, $path_language) {
    if (preg_match('|^something(?![^/])(.*)|', $path, $matches)) {
        $result = 'user'. $matches[1];
    }
	if (preg_match('|^something-else(?![^/])(.*)|', $path, $matches)) {
        $result = 'admin'. $matches[1];
    }
    if (preg_match('|^user(?![^/])(.*)|', $path, $matches)) {
        $result = '404'. $matches[1];
    }
	if (preg_match('|^admin(?![^/])(.*)|', $path, $matches)) {
        $result = '404'. $matches[1];
    }
}
/* end admin and user path change */

Thanks to my friend Trillian for writing the code.
Hope this is helpful.
Dig ya later, DOC

raghukr’s picture

Enable path module.
Add a dummy page (which may say 'Page not found' or something like that)

Add path alias [weird path] (ex: u134fh6nr) for 'user'
Add path alias 'user' for [dummy page path] (ex: node/21)

Now, path u134fh6nr will be your login page
path 'user' will be your dummy page.

ntg’s picture

Thank you for your answer. It was simple and perfect. No need to write/install modules or change the settings.php file.

april26’s picture

You are a genius! 90% of my sites are updated only by me but bots attempting to log in use up huge amounts of bandwidth and CPU.

There are 10 kinds of people in the world, those who understand binary and those who don't!
InterComm South Africa (www.intercomm.co.za)

raphael apard’s picture

I have created a small module doing this for D7 : rename_admin_path.

Raphael

ravis’s picture

wow... great job :)
Thanks for your useful contribution.
BTW, you posted wrong url of the module page. Correct url is:
http://drupal.org/project/rename_admin_paths

I work at Drupar.com