IT/Software/Server Config/Apache/Passwords: Difference between revisions
Walttheboss (talk | contribs) (Created page) |
Walttheboss (talk | contribs) No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=== General === | ===General=== | ||
These are passwords that are stored for webapps like webdav and secure folders. | These are passwords that are stored for webapps like webdav and secure folders. | ||
[https://httpd.apache.org/docs/2.4/programs/htpasswd.html from the Apache website] | |||
sudo htpasswd /usr/local/apache/passwd/passwords msg2013student | === register the user and password to apache === | ||
The first time you need to create the file if it doesn't exist | |||
<code>sudo htpasswd -c /path/tosecrets/file/name.ext user</code> | |||
Only do this once. If you ever use -c again you will lose all passwords that are in that file. | |||
We recommend a location other than the default and in a location other than the default. | |||
Typical usage is: | |||
<code>sudo htpasswd /usr/local/apache/passwd/passwords msg2013student</code> | |||
This will modify the password for that user if he/she exists. | This will modify the password for that user if he/she exists. | ||
Line 10: | Line 21: | ||
If they don't exist in Apache it will create the user and add the password. | If they don't exist in Apache it will create the user and add the password. | ||
It will prompt you for a password. You | It will prompt you for a password. You will not see it. Type twice to verify | ||
=== To delete a user === | |||
sudo htpasswd -D /usr/local/apache/passwd/passwords msg2013student | sudo htpasswd -D /usr/local/apache/passwd/passwords msg2013student | ||
To make or update a password and see it visibly as you enter it. | === To make or update a password and see it visibly as you enter it. === | ||
sudo htpasswd -b /etc/apache2/passwords uri uri | sudo htpasswd -b /etc/apache2/passwords uri uri |
Latest revision as of 06:03, 26 December 2020
General
These are passwords that are stored for webapps like webdav and secure folders.
register the user and password to apache
The first time you need to create the file if it doesn't exist
sudo htpasswd -c /path/tosecrets/file/name.ext user
Only do this once. If you ever use -c again you will lose all passwords that are in that file.
We recommend a location other than the default and in a location other than the default.
Typical usage is:
sudo htpasswd /usr/local/apache/passwd/passwords msg2013student
This will modify the password for that user if he/she exists.
If they don't exist in Apache it will create the user and add the password.
It will prompt you for a password. You will not see it. Type twice to verify
To delete a user
sudo htpasswd -D /usr/local/apache/passwd/passwords msg2013student
To make or update a password and see it visibly as you enter it.
sudo htpasswd -b /etc/apache2/passwords uri uri