To change a password I would use:
drush user-password USERNAME --password="SOMEPASSWORD"
Is there a similar way to change a user's name using Drush from the command line?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
There isn't a built in Drush command, but you can use Drush's
sql-query command (or
sqlq shorthand) to update the user's name:
drush sql-query "update users set name='SOMENEWNAME' where uid=####"
#### is the user's
users is the user table.
Just an update for those looking for this for Drupal 8.6+. The query should be
drush sql-query "UPDATE users_field_data SET name='somenewname' WHERE uid=##";