QuestionQ19

HTTP Services

To password-protect a directory on an Apache HTTPD web server, the following configuration was added to an .htaccess file in the corresponding directory:

Question Image

In addition, a file /var/www/dir/ .htpasswd was created containing: usera:S3cr3t

Assuming all these files were processed correctly by the web-server processes, which statement is true about requests to the directory?

  • A The user usera can access the site using the password s3cr3t
  • B Accessing the directory as usera raises HTTP error code 442 (User Not Existent)
  • C Requests are answered with HTTP error code 500 (Internal Server Error)
  • D The browser prompts the visitor for a username and password but logins for usera do not seem to work
  • E The web server delivers the content of the directory without requesting authentication
Explanation

HTTP Basic authentication causes the browser to prompt for credentials. Entries in an AuthUserFile must store a supported password hash, rather than a plaintext password such as S3cr3t; consequently, authentication for usera fails even though the user entry is present.

Community Discussion

No comments yet. Be the first to start the discussion!