Difference between revisions of "User:Djgreen/htpasswd"
m |
m |
||
Line 7: | Line 7: | ||
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 | |
− | + | </pre> | |
3. Edit the htpass file. | 3. Edit the htpass file. | ||
− | + | <pre> | |
− | + | htpasswd.dat -c ./.htpass djgreen | |
− | + | </pre> | |
If .htpass already exists, drop the "-c". | If .htpass already exists, drop the "-c". | ||
Revision as of 09:50, 30 June 2006
ok. This is what I've done. In each of those directories, I've placed the following files: .htpass / .htaccess / and htpasswd.dat .
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.dat -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.