[Koha-devel] Koha Cache -- Problem with Changing Admin Password?

Chris Cormack chris at bigballofwax.co.nz
Fri Dec 25 20:30:00 CET 2009


2009/12/25 Richard Forristall <Richard.Forristall at goodwillaz.org>:
> OK, well I found the issue - but some background info is required so
> anyone reading this can understand and apply to their situation.
>
> We installed the Koha unconfigured virtual appliance (VMDK) from here:
> http://kylehall.info/index.php/projects/koha/koha-virtual-appliance/
>
>
> Normally one expects the admin password to reside in something like:
> /koha/etc/koha-conf.xml
>
> A search of this file found a location here:
> /home/koha/koha-dev/etc/koha-conf.xml which had the default password
> value like this
>  <db_scheme>mysql</db_scheme>
>  <database>koha</database>
>  <hostname>localhost</hostname>
>  <port>3306</port>
>  <user>kohaadmin</user>
>  <pass>defaultpasswordwashere</pass>
>
> A copy of this file is also in here:
> /home/koha/kohaclone/blib/KOHA_CONF_DIR/koha-conf.xml
>
> I was originally changing the password in the second location, and not
> the first - - once I found and changed it in the first file, all seemed
> to work (this was after I changed the kohaadmin at localhost user's
> password in mysql and restarted apache2)
>
> I believe if you look in the Koha file in folder C4/Context.pm for these
> lines you see that the program looks for the first available readable
> file for a koha-conf.xml and uses it -
> # Koha's main configuration file koha-conf.xml
> # is searched for according to this priority list:
> #
> # 1. Path supplied via use C4::Context '/path/to/koha-conf.xml'
> # 2. Path supplied in KOHA_CONF environment variable.
> # 3. Path supplied in INSTALLED_CONFIG_FNAME, as long
> #    as value has changed from its default of
> #    '__KOHA_CONF_DIR__/koha-conf.xml', as happens
> #    when Koha is installed in 'standard' or 'single'
> #    mode.
> # 4. Path supplied in CONFIG_FNAME.
> #
> # The first entry that refers to a readable file is used.
>
> use constant CONFIG_FNAME => "/etc/koha/koha-conf.xml";
>                # Default config file, if none is specified
>
> my $INSTALLED_CONFIG_FNAME = '__KOHA_CONF_DIR__/koha-conf.xml';
>                # path to config file set by installer
>                # __KOHA_CONF_DIR__ is set by rewrite-confg.PL
>                # when Koha is installed in 'standard' or 'single'
>                # mode.  If Koha was installed in 'dev' mode,
>                # __KOHA_CONF_DIR__ is *not* rewritten; instead
>                # developers should set the KOHA_CONF environment
> variable
>
> $context = undef;        # Initially, no context is set
> @context_stack = ();        # Initially, no saved contexts
>
>
> =================================================================
> So, lesson learned?
>
> 1. look for all locations of "koha-conf.xml" and change the password in
> all locations.
>
Heres a tip, look in the /etc/apache2/sites-enabled/koha (or whatever
your koha-httpd.conf file  is called. Find what flle it has set as
KOHA_CONF .. then change that one.

That is the file it will be using. Then the rest of the steps work fine :)


> 2. restart apache2 (/etc/init.d/apache2 restart
>
> 3. change kohaadmin at localhost user's password in mysql
>
> ****************************************************************
> =========== { SPECIAL THANKS }===================================
> Chris Nighswonger from Foundations Bible College -- Thanks Chris for
> trying to figure this out with me!
> ===========/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/=============
>
> Everyone have a great Christmas!
>
>
>
Chris



More information about the Koha-devel mailing list