Documentation / Tutorials / Server

Adding new users to Ubuntu

/ Server / Adding new users to Ubuntu

Here are a quick set of commands to add a new user to ubuntu server, so that we can give them access to manage the server.

  1. adduser vyasa

    this command will add the user 'vyasa' to your server, it will ask for the password, please specify the password and other details.

  2. usermod -a -G sudo,www-data vyasa

    We are now adding user vyasa to group sudo and www-data so that this user can edit web application files directly.

  3. cd /home/vyasa & mkdir .ssh
    touch .ssh/authorized_keys
    chown -R vyasa:vyasa .ssh

    These set of commands create the authorized_keys file for vyasa user. You can now put the openssh keys in here so that user can use the key for login to the system.

Most Popular

Leave a Reply

Your email address will not be published.