Skip to content

Instantly share code, notes, and snippets.

@febbraro
Created July 9, 2012 18:26
Show Gist options
  • Save febbraro/3078045 to your computer and use it in GitHub Desktop.
Save febbraro/3078045 to your computer and use it in GitHub Desktop.
Cleanup / Obfuscate Drupal Users (sets default password for all users to 'test')
UPDATE users
SET name = CONCAT('user', (select @rownum:=@rownum+1 rownum FROM (SELECT @rownum:=0) r))
WHERE uid > 1;
UPDATE users
SET mail = CONCAT('user', (select @rownum:=@rownum+1 rownum FROM (SELECT @rownum:=0) r), '@example.com')
WHERE uid > 1;
UPDATE users
SET pass = '$S$DR.ROS3sDma71iTWcofZszOb8dMqrPi3PUWWNNc3rIwcG4ikL2gS'
where uid > 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment