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 202-450 topic 1 question 74 discussion

Actual exam question from LPI's 202-450
Question #: 74
Topic #: 1
[All 202-450 Questions]

There is a restricted area in a site hosted by Apache HTTPD, which requires users to authenticate against the file /srv/www/security/sitepasswd.
Which command is used to CHANGE the password of existing users, without losing data, when Basic authentication is being used?

  • A. htpasswd ""c /srv/www/security/sitepasswd user
  • B. htpasswd /srv/www/security/sitepasswd user
  • C. htpasswd ""n /srv/www/security/sitepasswd user
  • D. htpasswd ""D /srv/www/security/sitepasswd user
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
Reference: https://httpd.apache.org/docs/2.4/howto/auth.html

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
FabelhaftZuverlaessigerGorilla
Highly Voted 3 years, 8 months ago
Should be B as -c creates a new file.
upvoted 18 times
lite2000
3 years, 8 months ago
The -c argument is in option A so A is correct
upvoted 2 times
glorofarz
3 years, 8 months ago
B is correct, as you will find out in reality just tried it here on deb10 the -c option will nuke the file, and it will only contain the entry of the user of the commandline, all previous will be GONE.
upvoted 10 times
...
...
...
Lantos
Most Recent 10 months, 2 weeks ago
Selected Answer: B
From documentation: Examples htpasswd /usr/local/etc/apache/.htpasswd-users jsmith Adds or modifies the password for user jsmith. The user is prompted for the password. The password will be encrypted using the modified Apache MD5 algorithm. If the file does not exist, htpasswd will do nothing except return an error. Ref: https://httpd.apache.org/docs/2.4/programs/htpasswd.html
upvoted 1 times
...
shawarov
1 year ago
B for sure
upvoted 1 times
...
remiset
1 year, 4 months ago
Selected Answer: B
The question tell about modify, not create, then, you must use httpd without options, else, will create the file with new user.
upvoted 1 times
...
jorge_pas
2 years, 4 months ago
Should be B. https://linux.die.net/man/1/htpasswd -c create new file, -D delete user, -n is a test comand without arguments add o modify usuer
upvoted 2 times
...
usandoati
3 years, 8 months ago
It's the -c that makes it create a NEW password file, Then B is correct
upvoted 4 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 ...