<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.swcp.com/w/index.php?action=history&amp;feed=atom&amp;title=KB_429</id>
	<title>KB 429 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.swcp.com/w/index.php?action=history&amp;feed=atom&amp;title=KB_429"/>
	<link rel="alternate" type="text/html" href="https://wiki.swcp.com/w/index.php?title=KB_429&amp;action=history"/>
	<updated>2026-10-07T09:50:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.swcp.com/w/index.php?title=KB_429&amp;diff=198&amp;oldid=prev</id>
		<title>Jamii: New page: ===How do I password protect my web pages?===  Article:429  Created:2005-10-14 17:53:33  Categories:    Web Publishing  ====Question or Symptom====    ====Resolution==== NCSA compatible we...</title>
		<link rel="alternate" type="text/html" href="https://wiki.swcp.com/w/index.php?title=KB_429&amp;diff=198&amp;oldid=prev"/>
		<updated>2008-06-04T17:23:02Z</updated>

		<summary type="html">&lt;p&gt;New page: ===How do I password protect my web pages?===  Article:429  Created:2005-10-14 17:53:33  Categories:    Web Publishing  ====Question or Symptom====    ====Resolution==== NCSA compatible we...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===How do I password protect my web pages?===&lt;br /&gt;
 Article:429&lt;br /&gt;
 Created:2005-10-14 17:53:33&lt;br /&gt;
 Categories:&lt;br /&gt;
   Web Publishing&lt;br /&gt;
&lt;br /&gt;
====Question or Symptom====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Resolution====&lt;br /&gt;
NCSA compatible web servers and modern web browsers have the ability to perform&lt;br /&gt;
password authentication. These passwords are independent of system passwords.&lt;br /&gt;
To set up password protected web pages, follow these steps.&lt;br /&gt;
  &lt;br /&gt;
    * Create a new directory under your public_html directory which will store &lt;br /&gt;
      the protected pages.&lt;br /&gt;
    * Create a file in that directory called .htaccess with the following &lt;br /&gt;
      contents (password dialogue is the text which will appear to the browser&lt;br /&gt;
      in the password dialogue window, and login-name is your SWCP login)&lt;br /&gt;
  &lt;br /&gt;
         AuthUserFile /users/login-name/.htpasswd&lt;br /&gt;
         AuthGroupFile /users/login-name/.htgroup&lt;br /&gt;
         AuthName &amp;quot;password dialogue&amp;quot;&lt;br /&gt;
         AuthType Basic&lt;br /&gt;
         &amp;lt;Limit GET&amp;gt;&lt;br /&gt;
         require group my-users&lt;br /&gt;
         &amp;lt;/Limit&amp;gt;&lt;br /&gt;
    *  If your website is on our older web server (kumo) please remove the &lt;br /&gt;
       quotes from the AuthName argument.   &lt;br /&gt;
  &lt;br /&gt;
    * Create a file in your home directory called .htgroup with the contents&lt;br /&gt;
  &lt;br /&gt;
        my-users: pumpkin peanuts almonds walnuts&lt;br /&gt;
  &lt;br /&gt;
      These are the users who are allowed to access. They will also need to have&lt;br /&gt;
 passwords defined in .htpasswd. To create this file and add the first username&lt;br /&gt;
 use the following UNIX command:&lt;br /&gt;
  &lt;br /&gt;
        htpasswd -c /users/login-name/.htpasswd username&lt;br /&gt;
  &lt;br /&gt;
      After running the htpasswd command, you will be prompted for the users &lt;br /&gt;
 password twice. This will create a file /users/login-name/.htpasswd containing&lt;br /&gt;
 a encrypted form of the password. The -c option to the htpasswd command creates&lt;br /&gt;
 the password file so after adding the initial username use the following Unix &lt;br /&gt;
 command to add additional usernames:&lt;br /&gt;
  &lt;br /&gt;
    htpasswd /users/login-name/.htpasswd username&lt;br /&gt;
  &lt;br /&gt;
    * Finally, all 3 files have to be world readable (chmod a+r). Now, when any&lt;br /&gt;
 files in password protected directory are accessed, the browser will get a &lt;br /&gt;
 password required dialogue.&lt;br /&gt;
  &lt;br /&gt;
      chmod a+r /users/login-name/.htpasswd&lt;br /&gt;
      chmod a+r /users/login-name/.htgroup&lt;br /&gt;
      chmod a+r /users/login-name/public_html/somedir/.htaccess&lt;br /&gt;
  &lt;br /&gt;
 While very useful, there are a couple of drawbacks to this htpasswd mechanism.&lt;br /&gt;
 Users and their passwords have to be created using the command line utility, &lt;br /&gt;
 and then manually entered into .htgroup. Also, each time you run the htpasswd &lt;br /&gt;
 utility, it sets the mode of the file .htpasswd back to 600. So it will have to&lt;br /&gt;
 manually changed back to mode 644 (chmod a+r). Users who want to automate this &lt;br /&gt;
 procedure via CGI should keep these things in mind for their scripting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Related URLS====&lt;br /&gt;
  http://hoohoo.ncsa.uiuc.edu/docs/tutorials/user.html&lt;/div&gt;</summary>
		<author><name>Jamii</name></author>
	</entry>
</feed>