I have been trying to add users to the .htpasswd file with no luck.
Iam using the code shown in the home automation setup post.
sudo echo -e "USERNAME:`perl -le 'print crypt("PASSWORD","SALT")'`" > sudo /var/www/default/.htpasswd
when i put that I do not get an error, it just asks as if it ran. Yet when I use sudo nano to open the file, only the user pi is shown. which is the only login that works when I hit the webpage.
any ideas?
split the command in two parts:
sudo echo -e "USERNAME:`perl -le 'print crypt("PASSWORD","SALT")'`" -> this will output the generated password to screen, so copy it
sudo nano /var/www/default/.htpasswd -> now paste the user/password here
Also, google is your friend, almost always ;)