[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] password file created using perl (crypt) - doesn't work on RAQ2



But it does work on intel based machine!
I don't know, but it may has something to do with its mipsel in crypt
routine stuff.

The idea is an "instant access" site.
So the sequence would be:
users fill the form, submit, process by a perl script, then it creates a
username and password into a password file which already pointed by
.htaccess file, and reply a 'successfully created' page to the user.
Users may then get access to www.domain.com/members/ instantly.

this is part of the perl script:
=======================
  $passFile = '/home/httpd/passwords.dat';
  $username = $FORM{'username'};
  $password = $FORM{'password'};
  srand();
  @alphabet = ('a' .. 'z', 'A' .. 'Z', '0' .. '9', '.', '/');
  $salt = join ('', @alphabet[rand (64), rand (64)]);
  $password = crypt($password, $salt);
  open(FL,">>$passFile") || &error('error opening passfile');
  flock(FL,2);
  print FL "$username:$password\n";
  flock(FL,8);
  close FL;
=======================

and this is the content of /home/httpd/public_html/members/.htaccess:
=======================
AuthUserFile /home/httpd/passwords.dat
AuthGroupFile /dev/null
AuthName "Members Only"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>
=======================

The perl created file 'passwords.dat' was working fine on intel based Linux,
but not in RAQ2.
Even then I've tried creating new username/password with 'htpasswd'
manually, still not working!

Any help would be very very appreciated.

Thank's in advanced,
Didiek Priambudi
Roscor Corporation