I'm in the process of leaving my current job, and that requires that all of my accounts be disabled. Well, some of those accounts are user 1 accounts in a few of our Drupal sites. Is it possible to just "transfer" user 1 to another account?
As others have said, the user account with ID equal to 1 is a special account: It is one of the default accounts created by Drupal during its installation, and it is the only account to which every permission is assigned. (See @Clive's answer.)
What can be done is changing the password, and the email associated with that account.
Create a file in the same directory containing index.php, and add the following code.
With this code, everybody with access to the filesystem of the server can change the password, and the email of the user #1. I am not suggesting to change the password directly in the database because the password in clear; Drupal saves the hash obtained from user_hash_password(), whenever
If Drush is available, changing the password is even easier. Everybody could execute the following command:
Not as such, no. The
It explicitly checks for a user ID of 1, and bypasses any further checks based on that. The only way to simulate the same behaviour is to assign all system permissions to a role that another account has.
The easiest thing to do would just be to update the the user 1 accounts with the new admin's details as junedkazi suggests in the comments.