Difference between revisions of "User:Djgreen/htpasswd"

From WolfTech
Jump to navigation Jump to search
m
(removed the .dat)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
ok. This is what I've done. In each of those directories, I've placed the following files: .htpass / .htaccess / and htpasswd.dat .
+
'''ALTERNATIVE WEBPAGE PROTECTIONS'''
  
The first will contain all of the usernames and paswds you create.
+
ok. This is what I've done. In each of the directories, I've placed the following files: .htpass / .htaccess / and htpasswd (you can find these in L:\wolftech\web).
The second tells the webbrowser, STOP and chk if the person is in .htpass The third allows you to add and remove people from .htpass.
+
 
 +
The first will contain all of the usernames and paswds you create. The second tells the webbrowser, STOP and chk if the person is in .htpass The third allows you to add and remove people from .htpass.
  
 
Procedure to edit .htaccess:
 
Procedure to edit .htaccess:
  
 
1. Using Putty, ssh to ssh.ncsu.edu (Add/Remove programs, add new prgm, communications, Putty) 2. Change to the AEMP directory
 
1. Using Putty, ssh to ssh.ncsu.edu (Add/Remove programs, add new prgm, communications, Putty) 2. Change to the AEMP directory
 
+
<pre>
  cd /afs/eos/engrwww/aemp
+
cd /afs/eos/engrwww/aemp
 
+
</pre>
 
3. Edit the htpass file.
 
3. Edit the htpass file.
 
+
<pre>
  htpasswd.dat -c ./.htpass djgreen
+
htpasswd -c ./.htpass djgreen
 
+
</pre>
 
If .htpass already exists, drop the "-c".
 
If .htpass already exists, drop the "-c".
 
 
That creates or adds a user to the paswd file.
 
That creates or adds a user to the paswd file.
  

Latest revision as of 09:13, 25 October 2007

ALTERNATIVE WEBPAGE PROTECTIONS

ok. This is what I've done. In each of the directories, I've placed the following files: .htpass / .htaccess / and htpasswd (you can find these in L:\wolftech\web).

The first will contain all of the usernames and paswds you create. The second tells the webbrowser, STOP and chk if the person is in .htpass The third allows you to add and remove people from .htpass.

Procedure to edit .htaccess:

1. Using Putty, ssh to ssh.ncsu.edu (Add/Remove programs, add new prgm, communications, Putty) 2. Change to the AEMP directory

cd /afs/eos/engrwww/aemp

3. Edit the htpass file.

htpasswd -c ./.htpass djgreen

If .htpass already exists, drop the "-c". That creates or adds a user to the paswd file.

4. To remove a user, simply edit the .htpass file using either "vi" or "pico" and delete the line that user is on.

Just for reference the contents of the .htaccess file are:

AuthType Basic
AuthUserFile /afs/eos/engrservers/www/aemp/NSEC/.htpass
AuthName "Password Required"
require valid-user

One thing to note. When you tell it where to find the paswd file, you MUST use the full afs path and use /engrservers/www/ in place of /engrwww/ . Relative paths will not see it.