Package: slapd
Version: 2.2.26-5
Severity: important
Tags: patch

The password generated in config script is a invalid crypt passwd.
Why don't use slappasswd?

Thanks

  Manuel Baena <[EMAIL PROTECTED]>
  
-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686-smp
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages slapd depends on:
ii  coreutils [fileutils]       5.93-5       The GNU core utilities
ii  debconf                     1.4.67       Debian configuration management sy
ii  fileutils                   5.93-5       The GNU file management utilities 
ii  libc6                       2.3.5-11     GNU C Library: Shared libraries an
ii  libdb4.2                    4.2.52-23    Berkeley v4.2 Database Libraries [
ii  libiodbc2                   3.52.3-1     iODBC Driver Manager
ii  libldap-2.2-7               2.2.26-5     OpenLDAP libraries
ii  libltdl3                    1.6-0+1.5a-4 A system independent dlopen wrappe
ii  libperl5.8                  5.8.7-10     Shared Perl library
ii  libsasl2                    2.1.19-1.8   Authentication abstraction library
ii  libslp1                     1.2.1-5      OpenSLP libraries
ii  libssl0.9.8                 0.9.8a-5     SSL shared libraries
ii  libwrap0                    7.6.dbs-8    Wietse Venema's TCP wrappers libra
ii  perl [libmime-base64-perl]  5.8.7-10     Larry Wall's Practical Extraction 
ii  psmisc                      21.8-1       Utilities that use the proc filesy

Versions of packages slapd recommends:
ii  db4.2-util                    4.2.52-23  Berkeley v4.2 Database Utilities
ii  libsasl2-modules              2.1.19-1.8 Pluggable Authentication Modules f

-- debconf information excluded
620c620
<               userPassword: $adminpass
---
>               userPassword: {crypt}$adminpass
967c967
<       db_set slapd/internal/adminpw `slappasswd -s "$RET"`
---
>       db_set slapd/internal/adminpw `create_password_hash "$RET"`
973a974,1001
> create_password_hash() {                                              # {{{
> # Create the password hash for the given password
> # Usage: hash=`create_password_hash "$password"`
> 
>       perl - "$1" <<'EOF'
> # ---------------
> sub GenRandom {
>       local ($len) = @_;
>               local ($char, $data, @chars);
>               @chars = split(//, "abcdefghijklmnopqrstuvwxyz"
>                          . "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
>     
>               open(RD, "</dev/urandom") or die "Failed to open random source";
>               $data = "";
>               while ($len--) {
>               read(RD, $char, 1) == 1 or die "Failed to read random data";
>               $data .= $chars[ord($char) % @chars];
>               }
>     
>               close(RD);
>               return $data;
> }
> print crypt($ARGV[0], GenRandom(2));
> EOF
> # --------------
> }
> 
> # }}}
619c619
<               userPassword: $adminpass
---
>               userPassword: {crypt}$adminpass
966c966
<       db_set slapd/internal/adminpw `slappasswd -s "$RET"`
---
>       db_set slapd/internal/adminpw `create_password_hash "$RET"`
972a973,1000
> create_password_hash() {                                              # {{{
> # Create the password hash for the given password
> # Usage: hash=`create_password_hash "$password"`
> 
>       perl - "$1" <<'EOF'
> # ---------------
> sub GenRandom {
>       local ($len) = @_;
>               local ($char, $data, @chars);
>               @chars = split(//, "abcdefghijklmnopqrstuvwxyz"
>                          . "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
>     
>               open(RD, "</dev/urandom") or die "Failed to open random source";
>               $data = "";
>               while ($len--) {
>               read(RD, $char, 1) == 1 or die "Failed to read random data";
>               $data .= $chars[ord($char) % @chars];
>               }
>     
>               close(RD);
>               return $data;
> }
> print crypt($ARGV[0], GenRandom(2));
> EOF
> # --------------
> }
> 
> # }}}

Reply via email to