How to create users

Step-by-step guide

  1. Begin by adding the user
    1. sudo useradd <username>  // this will create the new user account
    2. sudo echo <username>:<new_password> | sudo chpasswd   // this will force through a new password onto the account
  2. To allow the <username> to change their password
    1. passwd -u <username>   // this will unlock the password so it can be changed by the user
    2. sudo su - <username>   // this logs onto the users account
    3. passwd   // the user can now follow the prompts to change their password