How do I create a new user on Ubuntu server
ID: 366
Category: Ubuntu
Added: 31st of December 2023
Updated On: Tutorial updated and rechecked on 15th of March 2024
Views: 1,058
To create a new user on Ubuntu server enter the following command in the terminal.
Login to your server as root user using ssh
ssh root@ip_address
Add the user
mycomputertips_user1 using the useradd command
useradd mycomputertips_user1
Set the password for user
mycomputertips_user1
passwd mycomputertips_user1
Create a new directory
mycomputertips_user1 for user
mycomputertips_user1 under the home directory
mkdir /home/mycomputertips_user1
Change ownership of folder to the new user
mycomputertips_user1 using the chown command which allows the user to read and write to the folder
chown mycomputertips_user1:mycomputertips_user1 /home/mycomputertips_user1
Set up shell prompt for
mycomputertips_user1 using the usermod command
usermod -s /bin/bash mycomputertips_user1
After setting up a new user you will notice the Owner and Group permissions which show 1000. This means this is the first non root user that has been created on the server. When you create the next user it will 1001 and so on...