Introduction
Welcome to the world of Linux! In this tutorial, we will be discussing how to add a new user with username “john” and password “password” using the Linux command line. Adding a new user is a simple process that requires only a few commands. We will be using the useradd command to create the new user, and the passwd command to set the password. Let’s get started!
Examples
useradd -m -p $(openssl passwd -1 password) john
If you want to add a new user with username “john” and password “password” on a Linux system, you can use the following command:
useradd -m -p $(openssl passwd -1 password) john
This command will create a new user with the username “john” and the password “password”. The -m flag will create a home directory for the user, and the -p flag will set the user’s password.