PacketFence - BTS - PacketFence
View Issue Details
0001248PacketFencecorepublic2011-08-18 07:492011-09-21 22:16
psnizek 
obilodeau 
normalminoralways
closedfixed 
2.2.1 
3.0.0 
28f3574c29359a831dc48a3764db69f15d2d7abb
0001248: htpasswd uses md5 by default; login.php uses crypt
my system: modified slackware 13.1, vanilla-kept daemons, packetfence 2.2.1 from tarball.

If I run installer.pl the admin password is encrypted using md5 instead of crypt.
htpasswd's help (from httpd 2.2.19) says that md5 is the default. htpasswd's manpage states this for Windows but says crypt for *nix systems.
Nevertheless, md5 seems to be used as the default also on *nix.
Maybe precisely specifying the encryption algo by using htpasswd's -d switch in installer.pl could prevent issues. Please see the patch below.
I have not tested this on Redhat or Centos. It may work as expected there.
--- installer.pl.orig 2011-08-18 13:36:18.235323981 +0200
+++ installer.pl 2011-08-17 20:21:17.193888957 +0200
@@ -354,7 +354,7 @@
         $adminuser = <STDIN>;
         chop $adminuser;
         $adminuser = "admin" if ( !$adminuser );
- } while ( system("htpasswd -c $conf_dir/admin.conf $adminuser") );
+ } while ( system("htpasswd -d -c $conf_dir/admin.conf $adminuser") );
 }
No tags attached.
Issue History
2011-08-18 07:49psnizekNew Issue
2011-08-23 12:16obilodeaumtn revision => 28f3574c29359a831dc48a3764db69f15d2d7abb
2011-08-23 12:16obilodeauNote Added: 0002148
2011-08-23 12:16obilodeauStatusnew => resolved
2011-08-23 12:16obilodeauFixed in Version => trunk
2011-08-23 12:16obilodeauResolutionopen => fixed
2011-08-23 12:16obilodeauAssigned To => obilodeau
2011-09-21 22:07obilodeauFixed in Versiontrunk => 3.0.0
2011-09-21 22:15obilodeauNote Added: 0002244
2011-09-21 22:16obilodeauStatusresolved => closed

Notes
(0002148)
obilodeau   
2011-08-23 12:16   
Thanks for the report. I added the -d switch in installer and also Admin -> Add User (where we call htpasswd).

Fixed in trunk, which will be released soon as 3.0.
(0002244)
obilodeau   
2011-09-21 22:15   
fix released in 3.0