Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam 102-500 topic 1 question 107 discussion

Actual exam question from LPI's 102-500
Question #: 107
Topic #: 1
[All 102-500 Questions]

FILL BLANK -
What option to useradd creates a new user's home directory and provisions it with a set of standard files? (Specify only the option name without any values or parameters.)

Show Suggested Answer Hide Answer
Suggested Answer: -D

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
fantomas3239
Highly Voted 3 years, 3 months ago
-m is correct because the main point in the description is - in the skeleton directory: -m, --create-home Create the user's home directory if it does not exist. The files and directories contained in the skeleton directory (which can be defined with the -k option) will be copied to the home directory. From the question we have - and provisions it with a set of standard files?
upvoted 14 times
...
yigido
Highly Voted 3 years, 7 months ago
can be “-m” If you use -d you need to specify a home directory
upvoted 8 times
...
BrascoChe
Most Recent 6 months, 2 weeks ago
-m is the right answer
upvoted 1 times
...
k3n_
1 year, 1 month ago
Should i answer with (create_home) or -m?
upvoted 1 times
...
k3n_
1 year, 1 month ago
Answer: -m -m options will create the directory. -d option needs an already created directory The question asks for a option that creates a new home's directory with a set of default files... -m, --create-home Create the user's home directory if it does not exist. The files and directories contained in the skeleton directory (which can be defined with the -k option) will be copied to the home directory. useradd will create the home directory unless CREATE_HOME in /etc/login.defs is set to no. -d, --home HOME_DIR The new user will be created using HOME_DIR as the value for the user's login directory. The default is to append the LOGIN name to BASE_DIR and use that as the login directory name. The directory HOME_DIR does not have to exist but will not be created if it is missing. Source: linux.die.net/man/8/useradd
upvoted 2 times
...
Stormy_Cloud
1 year, 2 months ago
I don't understand why everybody is pointing the correct answer '-m' And the actual answer '-D' is not corrected ??? No one is bothering change it. Why I paid 32$ in order to see the entire test results ???
upvoted 3 times
matthew_perry
12 months ago
++++ eto pizda
upvoted 1 times
...
...
drliu1202
1 year, 8 months ago
Answer is - m "-m Create a new user account with its home directory (if it does not exist)." https://learning.lpi.org/en/learning-materials/102-500/107/107.1/107.1_01/#:~:text=option%20is%20specified).-,%2Dm,account%20with%20its%20home%20directory%20(if%20it%20does%20not%20exist).,-%2DM -D is wrong "–D Display the default values" https://docs.oracle.com/cd/E88353_01/html/E72487/useradd-8.html#:~:text=on%20/home/%20username.-,%E2%80%93D,Display%20the%20default%20values,-for%20group%2C%20base_dir
upvoted 3 times
...
lucaverce
1 year, 11 months ago
The correct answer is -m From the MAN pages of useradd: ... OPTIONS -D, --defaults See below, the subsection "Changing the default values". ... Changing the default values When invoked with only the -D option, useradd will display the current default values. .... -m, --create-home Create the user's home directory if it does not exist. The files and directories contained in the skeleton directory (which can be defined with the -k option) will be copied to the home directory. By default, if this option is not specified and CREATE_HOME is not enabled, no home directories are created.
upvoted 3 times
...
KiddyLitty
1 year, 11 months ago
-D is just print or change default values (not create any folder) -m will surely create home directory even if not existed, and that folder will include all standard files or folder from SKEL folder. Answer should be - "-m"
upvoted 2 times
KiddyLitty
1 year, 11 months ago
useradd -D userX will not create any "user or home directory" but, useradd -m userX will create userX with standard home directory
upvoted 2 times
...
...
Lazylinux
1 year, 12 months ago
Definitely -m creates Home directory - see below options as per man page and for those say -D obviously have no clue as it prints out the default values that will be assigned to the user once created..What they should have said is NOT -D but -d, when using -d yes you create home directory for user BUT only used when you want to specify home directory for user NOT in traditional location i.e. /home and not with username, so something like /usr/MaxHome then you can use the -d but the question did not say that and said home directory and hence -m
upvoted 2 times
Lazylinux
1 year, 12 months ago
-D, --defaults print or change default useradd configuration -e, --expiredate EXPIRE_DATE expiration date of the new account -f, --inactive INACTIVE password inactivity period of the new account -g, --gid GROUP name or ID of the primary group of the new account -G, --groups GROUPS list of supplementary groups of the new account -k, --skel SKEL_DIR use this alternative skeleton directory -K, --key KEY=VALUE override /etc/login.defs defaults -l, --no-log-init do not add the user to the lastlog and faillog databases -m, --create-home create the user's home directory -M, --no-create-home do not create the user's home directory -N, --no-user-group do not create a group with the same name as the user
upvoted 3 times
...
...
wvdw1962
2 years, 1 month ago
-D, --defaults print or change default useradd configuration -d, --home-dir HOME_DIR home directory of the new account -m, --create-home create the user's home directory So, in my opinion, it should be "-m"
upvoted 3 times
...
Robert12
2 years, 2 months ago
I don't agree with -D , the man page just says See below, the subsection "Changing the default values". So it seems you have to have another parameter with the -D and the list given doesn't mention anything about adding a set of standard files. I think it could be -md
upvoted 1 times
...
TheChild
2 years, 3 months ago
When invoked without the -D option, the useradd command creates a new user account using the values specified on the command line plus the default values from the system. Right answer it is -D
upvoted 1 times
...
CuriousLinuxCat
2 years, 8 months ago
If, we can assume that the configuration file of useradd (/etc/defaults/useradd) has not been edited, then we must FORCE useradd to create a home directory by default by using the '-m' option to OVERRIDE defaults. $ sudo useradd -m test If the Linux administrator has defined the defaults in the (/etc/defaults/useradd), where the admin wishes to create a home directory for every user, then it is safe to use the -D option.
upvoted 2 times
...
Chenar
2 years, 10 months ago
-d is the correct answer.
upvoted 2 times
...
Rini_Giannenzo
3 years, 3 months ago
In pratica è -m poichè -d non crea la cartella se non esiste HOME_DIRE.
upvoted 2 times
...
sugisho
3 years, 5 months ago
# useradd --heip -d, --home-dir HOME_DIR home directory of the new account -D, --defaults print or change default useradd configuration -m, --create-home create the user's home directory
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...