Managing Users with Drush

Last modified: 
Tuesday, July 7th, 2015
Topics: 
drush

Create a new Drupal user with drush

drush ucrt user_name --mail="email@example.com" --password="changeMe456"

Assign one or more users to a role

# Assign to system administrator role by uid
drush urol "system administrator" --uid=2,3 

# Assign to system administrator role by user name
drush urol "system administrator" --name=user_name,"A different user"

# Assign to system administrator role by email
drush urol "system administrator" --mail=email@example.com


The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.