Differences
This shows you the differences between two versions of the page.
|
wiki:software:www:advanced [2012/09/24 13:45] 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 73: | Line 73: | ||
| 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 needs to have read and execute permissions. | ||
| + | |||
| + | <code bash> | ||
| + | chmod 0755 ~/authdir/ | ||
| + | </code> | ||
| Your .htpasswd file also needs to be set to the correct permissions. | Your .htpasswd file also needs to be set to the correct permissions. | ||
| Line 81: | Line 87: | ||
| 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. | ||
| + | |||
| + | For a more in depth tutorial on User Authentification using .htaccess and .htpasswd, see this page: http://weavervsworld.com/docs/other/passprotect.html | ||
| Have fun! | Have fun! | ||
