Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
How do you create a new user account and set the password for a user from a shell prompt in Linux?
Home
Linux
How do you create a new user account and set the password for a user from a shell prompt in Linux?
+1
vote
asked
Feb 18, 2021
in
Linux
by
SakshiSharma
How do you create a new user account and set the password for a user from a shell prompt in Linux?
#linux-account
account-password
linux
linux-shell
shell-prompt
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Feb 18, 2021
by
SakshiSharma
To create a new user account from a shell prompt follow the below steps:
Log in as root user if you are not logged in as root using su – command.
Enter the root user password
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:
Useradd smith
To set the password of the user smith type the command: passwd smith
It will prompt for the new password. Enter the new password for user smith.
It will ask to retype the password. So, retype the same password and password is set for the user.
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: How do you open a command prompt when issuing a command?
asked
May 9, 2021
in
Linux
by
sharadyadav1986
command-prompt
linux
+1
vote
Q: Describe the root account in Linux
asked
Feb 17, 2021
in
Linux
by
SakshiSharma
linux-root-account
root-account
linux-root
root
linux
+1
vote
Q: How do you share a program across different virtual desktops under Linux?
asked
May 9, 2021
in
Linux
by
sharadyadav1986
linux
share-program
+1
vote
Q: How do you access partitions under Linux?
asked
May 9, 2021
in
Linux
by
sharadyadav1986
access-partitions
linux
+1
vote
Q: How do you change permissions under Linux?
asked
May 9, 2021
in
Linux
by
sharadyadav1986
change-permission
linux
+1
vote
Q: How can you append one file to another in Linux?
asked
May 11, 2021
in
Linux
by
rajeshsharma
linux
append-file
0
votes
Q: How can you find out how much memory Linux is using?
asked
May 9, 2021
in
Linux
by
sharadyadav1986
limux-memory
linux
+1
vote
Q: Using which utility you can create a partition from the raw disk?
asked
Feb 18, 2021
in
Linux
by
SakshiSharma
#linux-utility
utility
linux
linux-partition
raw-disk
0
votes
Q: What is a typical size for a swap partition under a Linux system?
asked
May 9, 2021
in
Linux
by
sharadyadav1986
linux
linux-partition
0
votes
Q: Does it help for a Linux system to have multiple desktop environments installed?
asked
May 9, 2021
in
Linux
by
sharadyadav1986
linux-system
linux
...