+1 vote
in Linux by
How do you create a new user account and set the password for a user from a shell prompt in Linux?

1 Answer

0 votes
by

To create a new user account from a shell prompt follow the below steps:

  1. Log in as root user if you are not logged in as root using su – command.
  2. Enter the root user password
  3. The useradd command is used to create a new user in Linux. So, type command useradd and give the username you want to create as given below:
  4. Useradd smith
  5. To set the password of the user smith type the command: passwd smith
  6. It will prompt for the new password. Enter the new password for user smith.
  7. It will ask to retype the password. So, retype the same password and password is set for the user.

Related questions

+1 vote
asked May 9, 2021 in Linux by sharadyadav1986
0 votes
asked May 9, 2021 in Linux by sharadyadav1986
...