Published on 07/08/2019
Published by amit
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.
-
1adduser vyasa
this command will add the user ‘vyasa’ to your server, it will ask for the password, please specify the password and other details. -
1usermod -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. -
123cd /home/vyasa & mkdir .sshtouch .ssh/authorized_keyschown -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.