Gossamer Forum
Home : Products : DBMan : Customization :

Ouch!! Lost password field

Quote Reply
Ouch!! Lost password field
Ok so I was up to late and messed up my password field in the html.pl
I would like to see the actual password when I am in the "admin" mode.
I have tried a few names like $rec{'Password'} but no print out yet!
Can anyone help as I've searched the other files but the answer is well hidden as it should be!

Also I would like to print the password in the e-mail confirmation upon validation unless anyone wants to warn me not to do so!Thanks,
HJ



------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net
Quote Reply
Re: Ouch!! Lost password field In reply to
OK
Will go for the long run so you'll probably hear from me again here.

Regards,
HJ
Quote Reply
Re: Ouch!! Lost password field In reply to
No problem. If you have problems, post them here. Make sure that you use the most recent version of the Secure Lookup Mod, which is located at the following web page:

www.jpdeni.com/dbman/mods.html

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Ouch!! Lost password field In reply to
The password is not stored in the default.cfg file. It is stored in the .pass file. The way that you would "print the password" in the admin console would be to open the .pass file, NOT the database file to print the password.

In terms of sending the password, I am assuming that you are using the NEW Secure Password Lookup Mod, there should be instructions in that Mod file for sending the password to users.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Ouch!! Lost password field In reply to
Wow thanks for the quick response but I guess i'm not clear.

A while back when I logged in as "admin" and viewed a record the User ID and password were displayed to me.

If I'm right this is displayed from the
sub html_record_long routine in the html.pl with the if ($per_admin)letting only the admin see it.

I'm not up to the securepassword yet as am still working on validation and e-mail notification.

I guess its going to be a long night anyway!


------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net
Quote Reply
Re: Ouch!! Lost password field In reply to
Please post the code snippets you are using the html_record_long routine and also save your default.cfg file as a text file, such as defautcfg.txt and upload it your server. Then post the URL where we can find the default.cfg file.

Thanks.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Ouch!! Lost password field In reply to
Okay

Here is the snippet from the html_record_long.

I have only pasted the last rows of the table where the important stuff is for the admin. <tr>
<td width="270" bgcolor="#E0E0E0"><font color="#993333"><b><font size="2" face="Arial">Website</font></b></font></td>
<td width="270" bgcolor="#E0E0E0"><b><font face="Arial" size="2" color="#000000"><a href="$rec{'Website'}">$rec{'Website'}</a>|;
if ($per_admin) { print qq| </font></b></td>
</tr>
<tr>
<td width="270" bgcolor="#E0E0E0"><font color="#993333"><b><font size="2" face="Arial">User
ID</font></b></font></td>
<td width="270" bgcolor="#E0E0E0"><b><font face="Arial" size="2" color="#000000">$rec{'Userid'}</font></b></td>
</tr>
<tr>
<td width="270" bgcolor="#E0E0E0"><font color="#993333"><b><font size="2" face="Arial">Password
</font></b></font></td>
<td width="270" bgcolor="#E0E0E0"><b><font face="Arial" size="2" color="#000000">$rec{'Password'}</font></b></td>
</tr>
|; } print qq|
<tr>
<td width="270" bgcolor="#E0E0E0"><font color="#993333"><b><font size="2" face="Arial">Date
Added</font></b></font></td>
<td width="270" bgcolor="#E0E0E0"><b><font face="Arial" size="2" color="#000000">$rec{'Date'}</font></b></td>
</tr>
|; if ($per_admin) { print qq|
<tr>
<td width="270" bgcolor="#E0E0E0"><font color="#993333"><b><font size="2" face="Arial">Validated</font></b></font></td>
<td width="270" bgcolor="#E0E0E0"><b><font face="Arial" size="2" color="#000000">$rec{'Validated'}</font></b></td>
</tr>
|; } print qq|
</table>
</td>
</tr>
</table>


As for the default.cfg text file you can access it at:

http://www.classicboatworld.net/default_cfg.txt

Redards, HJ



------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net
Quote Reply
Re: Ouch!! Lost password field In reply to
Well, the reason that the Password is not showing up is because you do NOT have field in your default.cfg file for Password.
That is why it is not printing.

That is why I was bringing up the .pass file because it seems that is where the only "Password" field is stored. Do you want the password from the .pass file to be printed in the record if you as the administrator are viewing the records?

If so, then you will need to add some more codes to your html_record_long to pull the Password from the .pass file. Or you need to add the Password field into your default.cfg file.

If you want some codes that will pull the password from the .pass file, let me know.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Ouch!! Lost password field In reply to
Thanks Eliot I guess I was just seeing things before, sounds reasonable that it wouldnt print if its not in the file. I just thought it was protected somewhere else!

Yes if you could, I would like to have the codes.

I might eventually go with the secure passwords but for now Its easier to stay with this. As admin I will be adding boat records sometimes and then would like to give the owners easy passwords to modify etc.

If you or JPD ever make it to Amsterdam you have a boat ride coming for sure!

Regards

------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net
Quote Reply
Re: Ouch!! Lost password field In reply to
Thanks for the offer...may be taking you up on that offer next summer...if I travel to Madagascar again. I always make sure that I have a layover in Amsterdam.

I would really recommend installing the Secure Password Lookup Mod. This Mod allows the following:

1) Email Password (Create Account)
2) Forget Password Form - fill in form with email and get a new encrypted password.
3) Password Change Form
4) Email Address Change Form

In the long run, it will pay off. In the short term, it may be labor intensive, but it will pay off.

If you still want the codes, I can post them here.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Ouch!! Lost password field In reply to
Hi Eliot,

Well installing the mod was'nt to bad thanks to JPD's clear instructions. Everything seems to work with one problem;

Before installing the mod I still had the default admin user and password. (admin/admin)

So now I'm reminded of locking the car door only to realize the key is still inside!

The new mod does not recognize admin/admin so any ideas how to get back in?

Another question about the e-mail subroutines. I installed everything on the secure password mod and changed the 'Email' field length to -1 in the default.cfg as reccomended. However when adding a record as a new user I still see the e-mail adres after the record has been succesfully added. Is this supposed to be so? Am a little confused how this is going to work. Will a visitor see the actual e-mail adres to respond to a classified or is there supposed to be a link?

How does the e-mail adres submitted when creating an account relate to the e-mail adres posted when adding a record?

As admin I hope I'm able to post a record for someone else with their e-mail if need be.

Well I think I'll take the boat out now and wait until you send me a coat hanger or something else to get back in!

Regards,
HJ



------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net
Quote Reply
Re: Ouch!! Lost password field In reply to
The easy thing to do is to temporarily change permissions so that new users have admin permissions. Change the settings in default.cfg file. Then add yourself as a new user. Then go back to your default.cfg file...change the permissions back to how you had them before. Now you can access the DBMAN system as an admin account.

Does this make sense?

The email routines seem to be functioning just fine.

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Ouch!! Lost password field In reply to
Thanks Eliot,
It worked and I'm back in!

Now one of the last things I'm trying to set up is an e-mail notifying me as admin that a record is waiting to be validated.

I found your suggestion to StoneCOld (More on e-mail to admin) and tried it. However I got the same error message as he did:
Internal Server Error:Premature end of script headers.

I've tried to paste the code before and after the } following &html_add_succes in the db.cgi sub_add record routine without succes.

I have placed the $mailprog and $admin_email in the default.cfg and know this is working as I receive an e-mail as user when a record is validated.

Am including part of the db.cgi/sub_add_record code hoping you can spot the error.

&auth_logging("added record: $in{$db_key}") if ($auth_logging);
&html_add_success;
}
open (MAIL, "$mailprog") | | &cgierr("unable to open mail program");
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: Record Added to $html_title\n\n";
print MAIL "The following Record is waiting to be validated:\n\n";
print MAIL "Record ID: $rec{'ID'}\n";close (MAIL);

else {
&html_add_failure($status);
}


Regards,
HJ



------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net
Quote Reply
Re: Ouch!! Lost password field In reply to
You almost got it. The mail routine has to come IMMEDIATELY FOLLOWING the &html_add_success line. Also change the | | to or.

You have to remember that any &#0124; &#0124; codes printed in this UBB add a space between the two |. So, the better code to use is or. In that Thread that you read, I did suggest to StoneCold to use or rather than &#0124; &#0124;.

Here is how the codes should look:

Code:
&html_add_success;
open (MAIL, "$mailprog") or &cgierr("unable to open mail program");
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: Record Added to $html_title\n\n";
print MAIL "The following Record is waiting to be validated:\n\n";
print MAIL "Record ID: $rec{'ID'}\n";
close (MAIL);
}

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited September 12, 1999).]
Quote Reply
Re: Ouch!! Lost password field In reply to
Hi Eliot,

Thanks, everything is working and I'm almost finished! Really apreciate your help!

Just a couple more questions and I'll be using dbman on my site.

1.For the upload file mod I noticed if you hit upload by mistake without supplying the directory for the image it returns an upload success. I would like an error message about "please specify file etc..." And is it possible to make uploading an image mandatory, I dont want classifieds without an image to be possible.

2.I'm trying to have radio buttons print in a column in side a table row. Ive found the sub build_radio_field in db.cgi but am at a loss how to accomplish this. the code reads:

($output .= qq|<INPUT TYPE="RADIO" NAME="$column" VALUE="$button" CHECKED> $button \n|) :
($output .= qq|<INPUT TYPE="RADIO" NAME="$column" VALUE="$button"> $button \n|);

Any tips would again be greatly apreciated!

For a sneak preview of my work you can find dbman at:

http://www.classicboatworld.net/cgi-bin/dbman/db.cgi?uid=default

As soon as I've submitted real boats I'll post it on the forum and try to help newcomers on their journey in gratitude for all the help I have received!



------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net
Quote Reply
Re: Ouch!! Lost password field In reply to
I have not used the upload.cgi file yet, but you could possibly add in some codes before the success line that reads something like:

Code:

if (! $Filename) {
&html_upload_failure("You need to specify a file before uploading.");
exit;
}

after the following lines:

Code:
else {
$FILENAME_IN_QUESTION = $query->param($key);
&html_upload_failure("You attempted to upload a file that isn't properly formatted. The file in question is <B>$FILENAME_IN_QUESTION</B>. Please rename the file on your computer, and attempt to upload it again. Files may not have forward or backward slashes in their names. Also, they may not be prefixed with one (or more) periods.");
exit;
}

I don't know if this will work. But you can try it.

For the radio buttons, you need to change the code you wrote to read:

Code:
($output .= qq|<INPUT TYPE="RADIO" NAME="$column" VALUE="$button" CHECKED>
$button<BR>\n|) :
($output .= qq|<INPUT TYPE="RADIO" NAME="$column" VALUE="$button"> $button<BR>\n|);

Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited September 14, 1999).]
Quote Reply
Re: Ouch!! Lost password field In reply to
Hi Eliot,

I'm afraid the last two tips did not work. For the upload file I e-mailed the designer so will keep you posted.

The radio button suggestion does not work either.

Now here's something really weird!
All my input fields ie in the search form,add a record etc all diplay the users drop down list when you double click in the input field?

In db.cgi the field is formatted as;

'Userid' => [20, 'alpha', 10, 10, 1, '', ''],

and the only other place it could be messed up must be in the sub html_record_form in the html.pl

There I have;

if ($per_admin) { print qq|
<TR>
<TD ALIGN="Right" VALIGN="middle" WIDTH="40%" bgcolor="#C0C4C8"><b><$font_color>User
ID:</FONT></b></TD>
<TD VALIGN="TOP" WIDTH="60%" bgcolor="#E0E0E0">
<INPUT TYPE="TEXT" NAME="Userid" SIZE="10" VALUE="$rec{'Userid'}" MAXLENGTH="10">
</TD>
</TR>
|; } else { print qq|
<input type="hidden" NAME="Userid" VALUE="$rec{'Userid'}">
|;

And one more question, any idea how to place a javascript in the sub html_page_top? I would like to place my hitbox tracker there.

------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net
Quote Reply
Re: Ouch!! Lost password field In reply to
Regarding the upload codes, I was unsure whether they would work. In terms of the checkbox, I know that it works because I have it working in all my databases.

Wink

In terms of Javascript, you can put any Javascript codes between the <head></head> anchors in any of the sub-routines in the html.pl.

Regards,



------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us