[LON-CAPA-admin] Loncapa Captcha
Stuart Raeburn
raeburn at msu.edu
Wed Aug 23 19:17:21 EDT 2017
Hi Balagopal,
When I visited the "Contact Helpdesk" web form on your mathstat server
(reported version: 2.11.2) a few hours ago, a Captcha was included in
the form, and when I submitted with the correct Captcha completed, it
was validated, and the help request was processed. (Perhaps this is
your 14.04 instance?).
Your domain's configuration.db file will be found at:
/home/httpd/lonUsers/mathstatdal/configuration.db
On the filesystem you can view the contents using:
/home/httpd/perl/debug/dump_db.pl -u
/home/httpd/lonUsers/mathstatdal/configuration.db
If necessary you can rebuild the GDBM file from the corresponding
.hist file with the commands:
cd /home/httpd/lonUsers/mathstatdal/
/home/httpd/perl/debug/rebuild_db_from_hist.pl configuration.hist
if you want to test the rebuild first you would use:
/home/httpd/perl/debug/rebuild_db_from_hist.pl -t configuration.hist
However, I would check the backup of your server first, and compare
file size and modification time for the current configuration.db, and
the one in your backup.
>
> I see coursecatagories, cousedefaults etc on 14.04. But
> on 16.04, all I see is two sections (one is
> duplicate of the other)
Yes it sounds as though the 16.04 version does not have the complete
configuration.db file.
Note: the /cgi-bin/listdomconfig.pl script will output two copies of
the configuration information, each copy beginning with the header line:
Domain configuration for Department of Mathematics and Statistics
(lonmathstat1)
The reason for the duplicates is that the array returned by
¤t_machine_ids() in lonnet.pm will contain
('lonmathstat1','lonmathstat1');
lonnet.pm rev. 1.1351 fixes that; see:
https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.lon-2Dcapa.org_pipermail_lon-2Dcapa-2Dcvs_Week-2Dof-2DMon-2D20170821_027880.html&d=DwICAw&c=nE__W8dFE-shTxStwXtp0A&r=6g24AmpQZBPFulGSIuS5JJ6GiSlM0WnvLBs7abAf0Go&m=4mJ6HRfrDKRs8aCoPT4wZDKGHhKPn0VuHovOQ5OhRjY&s=9QZLoBYRDnzuQeI3PiiWUrT0hk-cB5AGmhrz3WBzmLU&e=
Stuart Raeburn
LON-CAPA Academic Consortium
Quoting Balagopal Pillai <Balagopal.Pillai at Dal.Ca>:
> Hi Stuart,
>
> I checked the capa server again. Please see below -
>
> libauthen-captcha-perl version - 1.024-1 on 16.04
>
> /home/httpd/perl/debug/memcached_dump.pl |grep 'login.captcha'
> 'mathstatdal.login.captcha' => 'original',
>
> But I noticed another issue. As domain co-ordinator on
> the 14.04 dev vm, listdomconfig.pl
> lists info that is several pages long. But on 16.04, the
> same thing is barely one page long.
> I see coursecatagories, cousedefaults etc on 14.04. But
> on 16.04, all I see is two sections (one is
> duplicate of the other) that says defaults, login = $VAR1
> and scantron. Could this be corrupted
> domain configuration? Could there be a way to regenerate
> this config. Thanks a lot.
>
>
>
>
> Regards
>
> Balagopal Pillai
> Room 004, Chase Building
> Department of Mathematics and Statistics
> Dalhousie University
> Halifax, NS
> (902) 494-3204
>
>
>
> ________________________________
> From: lon-capa-admin-bounces at mail.lon-capa.org
> <lon-capa-admin-bounces at mail.lon-capa.org> on behalf of Stuart
> Raeburn <raeburn at msu.edu>
> Sent: Wednesday, August 23, 2017 9:14 AM
> To: lon-capa-admin at mail.lon-capa.org
> Subject: Re: [LON-CAPA-admin] Loncapa Captcha
>
> Hi Balagopal,
>
> By default, no Captcha is included in the "Contact Helpdesk" web form
> (unauthenticated access) linked to from the log-in page.
>
> A domain coordinator would use: Main Menu > Set domain configuration >
> Display ("Log-in page options" checked), then check the "original
> (CAPTCHA)" radio button in the "Contact helpdesk" CAPTCHA validation
> row and push "Save Changes" to set the public-facing helpdesk to use
> Authen::Captcha.
>
> I tested this on VMs running Ubuntu 16.04 LTS (both 32 and 64 bit) and
> found that Captcha was working correctly, with files written to the
> captchadb and captchaspool directories when I displayed the helpdesk
> web form. When the form was submitted, the Captcha was validated as
> expected.
>
> A plain text display of your domain's configuration is available via:
> /cgi-bin/listdomconfig.pl. A domain coordinator can display that URL,
> when logged in, with the DC role selected. Look for the captcha item
> within the "login = $VAR1 = { }" data structure. You can also check
> what has been cached in memcache by running:
>
> /home/httpd/perl/debug/memcached_dump.pl |grep'login.captcha'
>
> from the command line.
>
> On Ubuntu 16.04 LTS:
>
> sudo dpkg-query -s libauthen-captcha-perl
>
> reports:
>
> Version: 1.024-1
> Depends: perl, libgd-perl | libgd-gd2-noxpm-perl | libgd-gd2-perl,
> libstring-random-perl
>
> You might check that the libgd-perl and libstring-random-perl packages
> are present.
>
> The version of libauthen-captcha-perl on Ubuntu 14.04 LTS is 1.023-6.
>
>
> Stuart Raeburn
> LON-CAPA Academic Consortium
>
> Quoting Balagopal Pillai <Balagopal.Pillai at Dal.Ca>:
>
>> Hi,
>>
>> I upgraded Loncapa version to 2.11.2 and Ubuntu to 16.04
>> today. Everything works fine
>> except the captcha on help desk link. I tested it by
>> upgrading the dev vm to 2.11.2 and leaving
>> ubuntu there to 14.04. Captcha worked fine there. I checked
>> the permissions for captchadb
>> and captchaspool directories and they are both owned by
>> apache user. The captcha perl packages
>> are present on both vms. The only difference is OS version.
>> I was wondering if there is something
>> I am overlooking here. Thanks a lot.
>>
>>
>>
>> Regards
>>
>> Balagopal Pillai
>> Room 004, Chase Building
>> Department of Mathematics and Statistics
>>>
>> Dalhousie University
>> Halifax, NS
>> (902) 494-3204
>
> _______________________________________________
> LON-CAPA-admin mailing list
> LON-CAPA-admin at mail.lon-capa.org
More information about the LON-CAPA-admin
mailing list