Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:software:www:advanced [2012/09/24 15:41]
David C LeFevre [User Authentification]
wiki:software:www:advanced [2012/09/24 15:48] (current)
David C LeFevre [User Authentication]
Line 41: Line 41:
 </code> </code>
  
-===== User Authentification =====+===== User Authentication =====
  
- +**A word of caution:** The procedure below sets up basic authentication only.  It is not to be considered highly secure.  Basic authentication is a handy solution to require a username and password to access a particular web directory but it isn't robust enough to secure highly sensitive data!
  
 **STEP 1.** Create a directory (name whatever you want)  in your __home directory.__ In this example, I called it "authdir". This directory will contain the .htpasswd file, which contains the passwords you give to the 'invited'- guests'. **STEP 1.** Create a directory (name whatever you want)  in your __home directory.__ In this example, I called it "authdir". This directory will contain the .htpasswd file, which contains the passwords you give to the 'invited'- guests'.
Line 74: Line 74:
 If you successfully execute the htpasswd command, you will be prompted to enter the password of your 'guest' twice. If you successfully execute the htpasswd command, you will be prompted to enter the password of your 'guest' twice.
  
-The directory where your .htpasswd resides also must be have read and execute permissions.+The directory where your .htpasswd resides needs to have read and execute permissions.
  
 <code bash> <code bash>
Line 85: Line 85:
    chmod 0644 ~/authdir/.htpasswd    chmod 0644 ~/authdir/.htpasswd
 </code> </code>
- 
  
 Make sure to have the correction protection mode in the authentication-required directory. A suggested protection mode is user-group executable and readable. This example shows a simple password-protected web page. To add additional users, (if, for example, each user who wants to access your protected pages needs their own password, simply run htpasswd again for each username/password pair. Make sure to have the correction protection mode in the authentication-required directory. A suggested protection mode is user-group executable and readable. This example shows a simple password-protected web page. To add additional users, (if, for example, each user who wants to access your protected pages needs their own password, simply run htpasswd again for each username/password pair.