Password changing for user?

This forum contains features that has been archived. This section contains implemented features, duplicate requests, and requests which we have decided not to implement.
Post Reply
redbeard
New user
New user
Posts: 5
Joined: 2004-04-24 16:34
Contact:

Password changing for user?

Post by redbeard » 2004-04-26 21:45

Has there been any thought on providing a mechanism for users to change their password? I administer a couple of email systems for faculty, staff and students at a small college, and would like to see a mechanism for users to manage their own passwords - either through a web page in Squirrelmail, or through some sort of other means.
Dr. Scott D. Berry
Director of Network Services
Professor of Physics
Limestone College
Gaffney, SC, USA

polarunion
Normal user
Normal user
Posts: 245
Joined: 2004-04-05 20:21
Location: Ottawa, Canada
Contact:

Post by polarunion » 2004-04-26 22:13

I'm also hoping on this as it would allow me to support more users than just myself.

It would be nice to be able to allow users to choose their own passwords in secret. They're quite turned off when they realise that I can see their passowords in plain view, especially if I'm the one generating them.

There is a squirrelmail plugins page that deals with this specifically however I have only started to learn how sql works and I won't be any help in trying to figure this one out. Maybe you or anyone else familiar with SQL can help with this...

http://www.squirrelmail.org/plugins_cat ... egory_id=5

It would be nice to see this implemented sooner than later, that's for sure. If only there were more devellopers that could help with this project, things would roll along much quicker.

nwkit
Normal user
Normal user
Posts: 133
Joined: 2004-04-19 03:57
Location: Canada

Post by nwkit » 2004-04-27 02:51

the squirrel mail one works great...the sql password changer....if anyone needs help with that, i have it working..

polarunion
Normal user
Normal user
Posts: 245
Joined: 2004-04-05 20:21
Location: Ottawa, Canada
Contact:

Post by polarunion » 2004-04-27 04:14

REALLY! do you think if it's not too much trouble that you can post up how you did it from start to finish? As thorough as you can without asking too much from you. I don't have a clue when it comes to databases. I just learned php so I'm a bit behind that anything on that front wouldn't make any sense..

Also how do you have it set up? Is it a web front that allows a user to change their own password? I'd love to see what you've come up with...

nwkit
Normal user
Normal user
Posts: 133
Joined: 2004-04-19 03:57
Location: Canada

Post by nwkit » 2004-04-27 06:08

umm...i use phpmyadmin to edit my sql databases...but to set up the sqlpassword changer for squirrelmail, i did not use phpmyadmin at all...i just edited the config file for that plugin and it works great...

Code: Select all

	
// The MySQL Server that SASL uses
$mysql_server = 'localhost';

// Database and table that SASL uses for auth
$mysql_database = 'hmailserver';
$mysql_table = 'hm_accounts';

// The names of the user ID and password columns
$mysql_userid_field = 'accountaddress';
$mysql_password_field ='accountpassword';

// The user to log into MySQL with (must have rights)
$mysql_manager_id = '****';
$mysql_manager_pw = '****';
these are the main variables you have to set...the ones i have already are generic to hmailserver...the ***'s represents whatever you chose the username and password to use the hmailserver database

other than these instructions, im not sure what else i can give because i didn't do much to get the plugin to work...sorry

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2004-04-27 22:42

Could it be that the problem occurs because you are using the MySQL server that comes with hmailserver (which is running on port 3307 instead of the default 3306)?

Perhaps you could replace
$mysql_server = 'localhost';
with
$mysql_server = 'localhost:3307';

No idea.. haven't tried this myself..

polarunion
Normal user
Normal user
Posts: 245
Joined: 2004-04-05 20:21
Location: Ottawa, Canada
Contact:

Post by polarunion » 2004-04-27 22:44

Ok, i followed your directions.

I'm getting errors upon signing into squirrelmail.

I see


Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10061) in D:\www\patrick\htdocs\mail\plugins\change_mysqlpass\functions.php on line 107


It's probably due to a problem with the sign in name and pass which would allow access to the hmail table.

but what is the user name?

when i started hmail and it sets up the database, i just put in a password. which i used. I tried all kinds of different combinations of user names, but where does that user name come from???

Thanks..

polarunion
Normal user
Normal user
Posts: 245
Joined: 2004-04-05 20:21
Location: Ottawa, Canada
Contact:

Post by polarunion » 2004-04-27 22:53

great martin. that was step one... phew...

if the database being used is the one that comes with hmailserver, i've determined that the user name must be "root".

the password is the password that the user supplied the sql database when hmail is being set up.

i've determined this from having logged in with all kinds of variations in config.php for the password change plugin. it is indeed the correct method.



now. i've run into this....

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in D:\www\patrick\htdocs\mail\plugins\change_mysqlpass\functions.php on line 129

If there is anyone out there that has successfully been able to get this running on hmail from the basic setup, could you walk it through step for step in what you had to do?

My specs are

WinXP
PHP
MySQL
hmailserver 3.0 RC1
squirrelmail 1.5.0 with the compatability plugin installed

nwkit
Normal user
Normal user
Posts: 133
Joined: 2004-04-19 03:57
Location: Canada

Post by nwkit » 2004-04-28 07:45

do you have your config file configured properly? there are a few settings in there you might have to tweak abit

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2004-04-29 22:13

I did the following things and it works perfectly fine for me:

1) Installed ompatibility plugin
2) Install mysql password changer
3) Edited config.php and added:

Code: Select all

// The MySQL Server that SASL uses 
$mysql_server = 'localhost:3307'; 

// Database and table that SASL uses for auth 
$mysql_database = 'hmailserver'; 
$mysql_table = 'hm_accounts'; 

// The names of the user ID and password columns 
$mysql_userid_field = 'accountaddress'; 
$mysql_password_field ='accountpassword'; 

// The user to log into MySQL with (must have rights) 
$mysql_manager_id = 'root'; 
$mysql_manager_pw = 'myrootpassword';
I then changed
$mysql_unixcrypt = 1
to:
$mysql_unixcrypt = 0

and
$use_ssl_for_password_change = 1;
to:
$use_ssl_for_password_change = 0;

This was it. Then it worked just fine.

If you use the character ' in the root password, you have to enter \' instead of that one..

polarunion
Normal user
Normal user
Posts: 245
Joined: 2004-04-05 20:21
Location: Ottawa, Canada
Contact:

Post by polarunion » 2004-04-29 22:47

ahhh! huge! thank you thank you thank you.

Post Reply