Until now, I used to create admin user with one of my private nicknames, hoping that not having a user named obviously admin would be some kind of a security measure for the site. Now I began to see that the user id 1 can have a special meaning for some modules (regardless of whether there is another user with admin role) and that nickname - along with my own style of password - will have to be used at some situations. That's OK as long as I'm involved in admin jobs, but will be a slight mental discomfort once I give up the role and yield it to someone else.

My question is: is there any way to add a user with admin role and then SWAP the IDs with Number One? It would probably be easy to do via PhpMyAdmin, if the tables did not have so much dependencies. Is there a module for that?


I presume you are using Drupal 6, as the admin role module is part of Drupal 7 core. If you install and enable admin role on your D6 site, it will make it easier to manage your non-ID-1 administrators, as you can just assign them the administrator role. You can just do this out of the box in D7.

On a related note, I also like to use the sudo module, and only apply the administrator role to my account when I need to do admin tasks on the site. The advantage of this is that I see the same set of menus and pages as other ordinary-permissioned users most of the time, which keeps me more in touch with the standard user experience for the site.

| improve this answer | |

Just give the admin role all permissions and he can do everything that the user with id 1 can do. The reason why modules do a check on user id 1 is because user id 1 doesn't need to have the admin role in order to have all privileges. The user id 1 allways has all privileges no matter what role he has.
You can easily check this looking at the permissions for content types, each new content type has a set of permissions which are disabled by default but the user with user id 1 can access all of them.
Swapping the user IDs seems like a very bad approach to handle this situation, certainly because it doesn't add extra value to the situation. It can be a bit of work to activate all privileges for the admin role but this seems to me like the only good way.

| improve this answer | |
  • Actually it would add extra value - the value that I'm after: I want to define a new admin user and make it Number One, so modules like Deploy will ask for the new login/password when creating endpoints. – Artur May 21 '12 at 0:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.