Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
htpasswd: could not determine temp dir
Try this as the user you use htpasswd as: "env| grep ^TM".
This should return tempdir vars like TMP, TEMP.
If not, set them.
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963
Original Poster
Rep:
This is from my notes
Hope it helps you out
Quote:
Password Protect web folders
Step 1
==================================================================================
System is Trustix 2.1
==================================================================================
Created a folder called ( protect ) /home/httpd/html/protect/
then add in the .htaccess file into the folder.
-------------------------------------------------------------------------
also put your web contect into the same folder /home/httpd/html/protect/
-------------------------------------------------------------------------
sample of .htaccess file below, use note pad and save as ( .htaccess )
htpasswd will ask you for the password, and then ask you to type it again to confirm it
---------------------------------------------------------
# htpasswd -c /home/pass/passwords user_name
New password: mypassword
Re-type new password: mypassword
Adding password for user user_name
---------------------------------------------------------
Check your password file by doing this below
--------------------------------------------
vi /home/pass/passwords
--------------------------------------------
To add a new user to htpasswd please go to the directory were the file
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.