Webpwd Feedback

Support section for FREESCO v0.3.x 3rd Party Packages

Postby dRB » Sat Jan 19, 2008 6:59 pm

Checked out the webpwd addon. The addon works nicely.

This is more related to an issue with Courier's pop3 server and how its user database is handled, which is directly related to the passwd file.

I'm not in very good problem-solving mode lately, and have been "misfiring" for awhile now, so suggestions/fixes are welcome.

When the passwd file has been changed, courier needs to sync its user database with the passwd file automatically. It would appear the webpwd cgi script is a binary file, and therefore cannot be edited.

Courier uses the following script to sync user/pw:
Code: Select all
courierusers nodone


How can we integrate this process into the webpwd addon?

Thanks,
/dRB
Please bear with me ... I seemed to have lost my marbles.
User avatar
dRB
Junior Advanced Member
 
Posts: 196
Joined: Tue Apr 30, 2002 2:08 am
Location: Dryden, Ontario. CANADA

Postby Thasaidon » Sun Jan 20, 2008 3:39 am

Well, my guess is that someone (Dingetje?) needs to either code this into the newpasswd.cgi file (which seems to be the file handling it all),
or you could use a cron job to have things synced.

The latter would mean that if a user changes his/her password he/she would have to wait for the cron job to be completed before the new password will become active.
Experience shared, is experience gained.

Thasaidon's Freesco Page




Image
User avatar
Thasaidon
Advanced Member
 
Posts: 411
Joined: Tue Feb 05, 2002 9:38 am
Location: The Netherlands

Postby dingetje » Sun Jan 20, 2008 6:21 am

I guess I could look into adding some kind of user hook (i.e. call a shell script) into the webpwd package. In the mean time, the cron solution as suggested by Thasaidon is a good solution. The script could check if the passwd file has been changed recently (it should thus 'remember' the last seen time stamp) and if so run the required synchronization step.
GreetZ
http://dingetje.hopto.org

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1010
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands

Postby dRB » Mon Jan 21, 2008 9:37 pm

Thanks for the feedback guys. I'm starting to crawl back into the saddle ... the "fog" is beginning to clear.

I guess the quickest route would be a cron job.

Now that I seem to be functioning better, I decided to tackle some shell scripting.

And wrote a script called pw2htpw.cgi, which extracts "email" user/pw pairs from the passwd file, and drops them into two htpasswd files that I use to password protect both Courier's webmail and Webpwd entrance pages.

I've customized the Webpwd interface like so
Image
giving my users flexibility to move from password changing to webmail or main site.

What I need to do is test validity of OLD PASSWORD, before following thru with any sync'ing. Not sure yet if Dingetje's newpasswd.cgi file returns 1 or 0 depending on successful password change. Which would be ideal if so.

/dRB
Please bear with me ... I seemed to have lost my marbles.
User avatar
dRB
Junior Advanced Member
 
Posts: 196
Joined: Tue Apr 30, 2002 2:08 am
Location: Dryden, Ontario. CANADA

Postby dRB » Thu Jan 24, 2008 12:09 am

The following executed without errors, but changes were not written to the etc_passwd file
Code: Select all
system ("echo $NP1 | passwd --stdin $U");


:angry: after some level of frustration with trying to get passwd to write changes to the password file via a script, so that I could integrate other customized changes, I finally decided to write the entire password changing script myself. :P

Objective here was to have Webpwd work seamlessly with Courier and Squirrel, and to have the webmail login page as well as the Webpwd access page password protected with valid user email accounts.

Script seems to be working well so far. And uses Dingetje's Webpwd addon (less the index.html page and the newpasswd.cgi binary).

It locks the passwd file during changes, and then unlocks it when done.

htpasswd files are shadowed with valid email user/pw pairs

And courier user dbs is updated immediately upon password changes.

Custom response pages identify success, failure or locked states.

Once I clean up the "mess", this maybe useful to others who use courier and webpwd.

/dRB
Please bear with me ... I seemed to have lost my marbles.
User avatar
dRB
Junior Advanced Member
 
Posts: 196
Joined: Tue Apr 30, 2002 2:08 am
Location: Dryden, Ontario. CANADA

Postby dingetje » Thu Jan 24, 2008 3:03 am

I :wub: your new page layout.

Once I clean up the "mess", this maybe useful to others who use courier and webpwd.


Maybe a new package eh? ^_^ ;)
GreetZ
http://dingetje.hopto.org

"Software is like sex: it's better when it's free." - LINUS TORVALDS
User avatar
dingetje
FREESCO GURU !!
 
Posts: 1010
Joined: Wed Nov 14, 2001 12:13 pm
Location: The Netherlands

Postby dRB » Fri Jan 25, 2008 3:45 am

thanks Dingetje. sent you a pm. :)

/dRB
Please bear with me ... I seemed to have lost my marbles.
User avatar
dRB
Junior Advanced Member
 
Posts: 196
Joined: Tue Apr 30, 2002 2:08 am
Location: Dryden, Ontario. CANADA


Return to 3rd Party Package Support for FREESCO v0.3.x

Who is online

Users browsing this forum: No registered users and 2 guests

cron