G+_Geoff Galley Posted February 6, 2017 Share Posted February 6, 2017 G'Day all, I am currently build a Raspberry Garage Door Monitor and Web Page based Remote control. I am following instructions in a Magazine called SiliconeChip which has a step by step instruction based over 3 magazines. (Yes I am a Noob) I have had no problems untill I hit this step which allows me access via the web. The lines are as follows. sudo apt-get install apache2-utils sudo a2enmod authn_dbm now come the line I get the problem with sudo htdbm -c -TSDBM /etc/apache2/dbmpasswd Please see photo of error. I know the the are replaced with real username and password without the <>. but I cant seem to get passed the 3rd line. I have done a sudo apt-get update, install and reboot. I have tried swapping the -c -TSDBM around, but no luck Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted February 6, 2017 Share Posted February 6, 2017 I'm not so sure that's an error, but maybe a warning. You can probably get rid of the message by using the "-B" or "-m" options for BCRYPT or MD5. Since MD5 and SHA aren't real secure (maybe fine for this use), BCRYPT would be much better. I suspect you could check the content of the file with: cat /etc/apache2/dbmpasswd Since I'm not familiar with htdbm, I don't know what you should expect to see there. Link to comment Share on other sites More sharing options...
G+_Tony Martin Posted February 6, 2017 Share Posted February 6, 2017 It is not clear to me exactly what you are trying to do here. However, it appears to me that you are trying to create an authentication database. If that is what you are trying to do I would try this (htdbm -c path/filename username). Basically just remove the -TSDBM and password from what you already have, you will have to set the password later. Link to comment Share on other sites More sharing options...
G+_David Wiggins Posted February 6, 2017 Share Posted February 6, 2017 It looks like the -T switch had several options SDBM, GDBM, DB, and DEFAULT. There should be a space between the switch and option. So that part should be -T SDBM Rather than run together. With it together, it is unrecognised as pay out the command. Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted February 6, 2017 Share Posted February 6, 2017 David Wiggins Doh! I should have caught that last night. Link to comment Share on other sites More sharing options...
G+_Geoff Galley Posted February 7, 2017 Author Share Posted February 7, 2017 Thx folks I will try that this week. Link to comment Share on other sites More sharing options...
G+_Geoff Galley Posted February 7, 2017 Author Share Posted February 7, 2017 I have tried David's theory but it still refuses to create the file directory. The next line in the programing is as follows sudo chown www-data /etc/apache2/dbmpasswd.pag when I run that line it states that there is no such file or directory Link to comment Share on other sites More sharing options...
G+_Tony Martin Posted February 7, 2017 Share Posted February 7, 2017 -t and -TDBTYPE are two different things. -t is used for comments while -TDBTYPE is used for specifying the file type. Both are unnecessary unless there is already a file on the system or you want the file you create to be of a specific type. Remember that it is case sensitive. Also if you are set on doing it as the article says try the same line that you have been trying without the password. It should then prompt you for the password. These links may help you. I think the last link will most likely help you the most. httpd.apache.org - htdbm - Manipulate DBM password databases - Apache HTTP Server Version 2.4 http://man.he.net/man1/htdbm http://howtolamp.com/lamp/httpd/2.4/securing/auth-basic-dbm/ Link to comment Share on other sites More sharing options...
G+_Geoff Galley Posted February 8, 2017 Author Share Posted February 8, 2017 Thx guys I got it working by leaving the password out, It then asked me to create one..(as per Tony's suggestion) Thx again. A noob at work Link to comment Share on other sites More sharing options...
G+_Tony Martin Posted February 8, 2017 Share Posted February 8, 2017 Happy to help, if you need anymore help let us know. Good luck on your project and have fun. Link to comment Share on other sites More sharing options...
Recommended Posts