Re: NSLU2 internal thttpd .htpasswd support
- --- In firstname.lastname@example.org, Harsh <harshbaste@...> wrote:
> Ok here goes. As mentioned in the link I sent in my previous mail, Ihave used the Linksys internal thttpd server. I have not installed it
via ipkg since all the binaries were already part of the stock unslung
>what it all looks like :
> After getting it running with regular static pages and cgi, here is
>is needed for reasons outlined here :
> I launch it using a hard link to the original binary (the new file
>.htpasswd file in that folder to authenticate requests there.
> /opt/sbin/mythttpd -C /opt/etc/mythttpd.conf
> The config file is as follows:
> bash-3.2# cat /opt/etc/mythttpd.conf
> # This section overrides defaults
> # nosymlink# default = !chroot
> # novhost
> # nocgipat
> # nothrottles
> # host=0.0.0.0
> # charset=iso-8859-1
> My files are all sitting in /opt/share/www and I have a single
>does not accept the password. I tried just copying over the htpasswd
> I do get a prompt for the password when I try to http into it but it
from /home/httpd/ html/Management/.htpasswd but it didnt recognize
that password either for some reason and keeps prompting me for it
even if I enter it correctly. That password does work successfully for
the regular unslung web admin console so the decode certainly seems to
>second problem is how to generate that password for a new login for
> Even if I somehow did get the default admin password to work, my
>management console uses
> I tried making my own version of htpasswd using perl crypt like this :
> bash-3.2# cat `which htpasswd`
> use strict;
> my $user = $ARGV;
> my $pass = $ARGV;
> print $user. ":" . crypt($pass, "cg") . "\n";
> It produces a scrambled admin password identical to what the
> bash-3.2# htpasswd admin adminI'm no where an expert on any of this but there are a couple of things
> bash-3.2# cat /home/httpd/html/Management/.htpasswd
I can mention.
First I like to troubleshoot 'fault' like this as root user so I would
properly not use 'user=nobody' at this stage.
As I work from a w2k I used ChaosMD5 to create my password.
Also one could try different way to create the password.
digest password use this format to create the hash.
'user:path:passwd' not just the password alone
But I guess your copy & paiste approach has ensured that the format is