change admin username to prevent robot attacks?

change admin username to prevent robot attacks?

by Carol Booth -
Number of replies: 5
I've twice had what appear to be robot attacks, where I get lots of failed logins as admin in very quick succession. I have read that a simple tactic to avoid these is changing the admin username. If I do this, do I also need to change
$CFG->admin = 'admin';

to another value?
Thanks
Carol
Average of ratings: -
In reply to Carol Booth

Re: change admin username to prevent robot attacks?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
No, $CFG->admin controls the URL used to access what is normally http://example.com/moodle/admin/...

If you want to move the admin pages to a URL like http://example.com/moodle/maintenance/..., then set $CFG->admin = 'maintenance'.
Average of ratings: Useful (2)
In reply to Carol Booth

Re: change admin username to prevent robot attacks?

by Deb Smith -

I have a similar question.  Recently my admin account was hijacked and I was unable to login to the Administrator's Control Panel.  Where do I change my userid so that instead of admin, it is kittycat or some such name?  Just in my user profile?  I assume that changing my user profile will automatically update the database?  From the response here, I also assume that I don't have to make any changes to the config.php?

Thanks in advance for your help!

In reply to Deb Smith

Re: change admin username to prevent robot attacks?

by Guillermo Madero -

Yes, just in your user profile. Yes, it will automatically update your database. And, no, you do not have to make any changes to config.php.

Cheers!

Average of ratings: Useful (1)