backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 40 forks source link

Change Login Page URL #1977

Closed bd0bd closed 5 years ago

bd0bd commented 8 years ago

Hi!

Can not find the way to change domain.com/user to something else. May be to domain.com/abc

Thank you!

klonos commented 8 years ago

Hi @bd0bd ...you can try adding a URL alias in /admin/config/search/path/add. Add user in the first field and abc (or whatever you want) in the second field and save. This will make it so that the link http://my.site.net/abc works and shows the login page. http://my.site.net/user will still keep working...

You can also create a redirect: go to /admin/config/search/redirect/add. Add abc (or whatever you want) in the "From" field and user in the "To" field. When you save the form, you will receive a warning message. Click on the "I understand" checkbox and hit save again. Now, each time you visit http://my.site.net/abc, you will be redirected to the http://my.site.net/user URL.

Hope this helps.

bd0bd commented 8 years ago

Thank you! No, this is not what I need. I need to change URL user to something else. I do not need URL user or redirects.

 http://my.site.net/user will still keep working...

This is what I do not need. I want to change it so nobody knew what is login URL.

klonos commented 8 years ago

/user is an internal system path. I don't think you can simply remove or replace it. What you need is either Login Disable or Rename Admin Paths, but unfortunately neither one has been ported to Backdrop yet.

bd0bd commented 8 years ago

Hm ... In the CMS I have used for several years I can change it very easy - in the settings/configuration.

Why not to add this option in /admin/config/system/site-information or in URL aliases?

Why all other people should know the URL of my admin page? I think this is not good.

klonos commented 8 years ago

Yes, I agree. Some features are for core and some others are left for contrib. Specifically, the Rename Admin Paths module for Drupal that does what you are asking has only 10k users (that's not even 1% of Drupal sites). So I guess it is not such a popular feature.

I am not a coder but have recently started contributing code in order to make the changes I wanted in core a reality. You can spent some time to learn how to code and do it too. I am confident that you will make it if you try. This way, each time you need a feature for your websites, you can do it yourself. If there are existing modules in Drupal that do what you want, you will not even have to start from scratch. You can just port the Drupal module to Backdrop. This way, the time you spent will benefit others too.

I have started porting some modules (including Rename Admin Paths), but they are not ready for general consumption yet.

Final note is that you should carefully evaluate the software that you will use for a website before you actually start using it. If the features you want for your website are not available in the software you use, then you will hit roadblocks. Depending on how important these features are to the everyday use of your website, you will have to make a choice: just either not implement the features, or choose another software. That could be Drupal, or Backdrop, or the other CMS you were using for years. The alternative is to either wait patiently for someone else to implement these features in the software of your choice, or as I said, you become that someone yourself.

bd0bd commented 8 years ago
So I guess it is not such a popular feature.

Sure, it is not popular. It is for security and for real prof people-developers who cares about their websites. Most 'webmasters' are dummies :smile:

to either wait patiently 

Life is short to wait for it.

bd0bd commented 8 years ago

@klonos, may be you can tell me the file name (in the core) where I can manually change "user"? Thank you!

klonos commented 8 years ago

Not sure. My knowledge of core is not of that level, but if I was to take a wild guess, it would be any of the system, path or user modules. All of these sound very important and messing with them might render your website unusable with no way to recover. So be careful!!!

Also, it is not wise to "hack" core. Each time you upgrade to a new version, your changes will be wiped and you'll have to make them again.

Gormartsen commented 8 years ago

Better to write small module to redefine it.

You will need to use hook_menu_alter

Regards, Gor Martsen @gormartsen

On Jun 18, 2016, at 8:09 AM, bd0bd notifications@github.com wrote:

So I guess it is not such a popular feature. Sure, it is not popular. It is for security and for real prof people-developers who cares about their websites. Most 'webmasters' are dummies 😄

to either wait patiently Life is short to wait for it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

klonos commented 8 years ago

...and by that, @Gormartsen meant go to https://api.backdropcms.org search for "hook_menu_alter" and then you should find yourself in https://api.backdropcms.org/api/backdrop/core%21modules%21system%21system.api.php/function/hook_menu_alter/1 where you can see the usage and some examples of hook_menu_alter

klonos commented 8 years ago

...in the same site, at the sidebar to the right, you will find likes to the "Developing Modules" guide which includes the "Creating modules" and "Understanding the hook system" sections. That should be enough to keep you busy 😄

bd0bd commented 8 years ago

@Gormartsen @klonos thank you very much!

I can not develop modules - it is something what is difficult for me (I have tried to learn Perl, CGI in 1997).

your website unusable with no way to recover. So be careful!!!

This is not a problem - I can restore (in few minutes) the database or website. I have auto backup (ftp folders and MySQL databases) for 15 days.

LeeteqXV commented 7 years ago

Rename_admin_paths: I am using it by simply adding the BD-lines to the .info file as per the docs.

Only the login path works ok - which is enough for me for now (the most important of the two) Renaming the admin paths does not work properly, or at least it throws one error on each such page after activation. Not sure if it technically works for admin paths regardless of that error message.

LeeteqXV commented 7 years ago

FWIW - This issue deals with very obvious security concerns: it becomes trivial to fend off robot attacks by using URLs that attackers/robots must guess (like a password) BEFORE they can have their automated attack tools started. This must be one of the cheapest of all counter-measures for such common cases... So, IM(not-so-H)O, this functionality absolutely belongs in core.

klonos commented 5 years ago

There has not been any activity here for a couple of years now. I think that it would be best to file a request to port https://www.drupal.org/project/rename_admin_paths in https://github.com/backdrop-ops/contrib/issues

Closing this one...