ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 122 - XK0-005 discussion

Report
Export

A Linux administrator needs to create a new user named user02. However, user02 must be in a different home directory, which is under /comptia/projects. Which of the following commands will accomplish this task?

A.
useradd -d /comptia/projects user02
Answers
A.
useradd -d /comptia/projects user02
B.
useradd -m /comptia/projects user02
Answers
B.
useradd -m /comptia/projects user02
C.
useradd -b /comptia/projects user02
Answers
C.
useradd -b /comptia/projects user02
D.
useradd -s /comptia/projects user02
Answers
D.
useradd -s /comptia/projects user02
Suggested answer: A

Explanation:

The command useradd -d /comptia/projects user02 will accomplish the task of creating a new user named user02 with a different home directory. The useradd command is a tool for creating new user accounts on Linux systems. The -d option specifies the home directory for the new user, which is the directory where the user's personal files and settings are stored. The /comptia/projects is the path of the home directory for the new user, which is different from the default location of /home/user02.

The user02 is the name of the new user. The command useradd -d /comptia/projects user02 will create a new user named user02 with a home directory under /comptia/projects. This is the correct command to use to accomplish the task. The other options are incorrect because they either do not specify the home directory for the new user (useradd -m /comptia/projects user02 or useradd -s /comptia/projects user02) or do not use the correct option for the home directory (useradd -b /comptia/projects user02 instead of useradd -d /comptia/projects user02). Reference: CompTIA Linux+ (XK0-005) Certification Study Guide, Chapter 13: Managing Users and Groups, page 403.

asked 02/10/2024
Christopher Castillo
35 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first