Create a user via the Installation profile I am using Installation Profiles to automate the process of installing Drupal 7 websites

I would like to create a user via the installation profile and assign it a username, password and email address, plus give it a role (This will be a special administrative user that I want every website to have). 

How can I do this?
This is the closest tutorial I can find. However, it requires you to set a username/password and email address manually. I would like to store a default values for all these fields.
If you still want a configuration form, then you can build upon the "Client step" and change the function brochure_client_form_submit($form, &amp;$form_state) so that it suits your needs (all code is untested):

function brochure_client_form_submit($form, &amp;$form_state) {

  // Setup the user account array to programatically create a new user.
  $account = array(
    'name' =&gt; YOUR_NAME,
    'pass' =&gt; YOUR_PASS,
    'mail' =&gt; YOUR_MAIL,
    'status' =&gt; 1,
    'init' =&gt; 'install profile', // Just an example
  );
  $account = user_save(null, $account);
}


If you don't need a separate configuration form during install, you can define a "formless" task like this:

/**
 * Implements hook_install_tasks().
 */
function mymodule_install_tasks() {
  $tasks['mymodule_setup_admin_account'] = array(
    'display_name' =&gt; st('Setup admin account'),
  );
  return $tasks;
}

function mymodule_setup_admin_account() {
  // Setup the user account array to programatically create a new user.
  $account = array(
    'name' =&gt; YOUR_NAME,
    'pass' =&gt; YOUR_PASS,
    'mail' =&gt; YOUR_MAIL,
    'status' =&gt; 1,
    'init' =&gt; 'install profile', // Just an example
  );
  $account = user_save(null, $account);
}


You still have to create the role and add it to the created user. If you have created the role prior to the user creation, then you can also pass it directly to user_save:

$account = array(
  'name' =&gt; YOUR_NAME,
  'pass' =&gt; YOUR_PASS,
  'mail' =&gt; YOUR_MAIL,
  'status' =&gt; 1,
  'init' =&gt; 'install profile', // Just an example
  'roles' =&gt; array(
    ROLE_ID =&gt; ROLE_ID,
  ),
);
$account = user_save(null, $account);


More on install profiles: How to Write a Drupal 7 Installation Profile