[horde] Question about password reset function.

W Z iamnewleon at gmail.com
Tue Sep 3 18:24:58 UTC 2013


Gents,

The more I dig into this issue, the more issues I have caused. To this
point, It is more of my own ignorance ...
Here is what I got.

I went to Authentication module, change Conf['auth']['driver']  to  mysql ,
then generated the config file, and added an account "Administrator" with
password. Then I log out and try to log in.
Now I got Fata error...
see the MSGs below

A fatal error has occurredexception 'PDOException' with message
'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'administrator' for key 'rampage_users_user_name'' in
/usr/share/php/Horde/Db/Adapter/Base.php:551 Stack trace: #0
/usr/share/php/Horde/Db/Adapter/Base.php(551): PDO->query('INSERT INTO
`ra...') #1 /usr/share/php/Horde/Db/Adapter/Base.php(584):
Horde_Db_Adapter_Base->execute('INSERT INTO `ra...', NULL, NULL) #2
/var/www/content/lib/Users/Manager.php(75):
Horde_Db_Adapter_Base->insert('INSERT INTO `ra...') #3
/var/www/trean/lib/Bookmarks.php(30):
Content_Users_Manager->ensureUsers('administrator') #4 [internal function]:
Trean_Bookmarks->__construct(Object(Content_Users_Manager)) #5
/usr/share/php/Horde/Injector/Binder/Implementation.php(86):
ReflectionClass->newInstanceArgs(Array) #6
/usr/share/php/Horde/Injector/Binder/Implementation.php(66):
Horde_Injector_Binder_Implementation->_getInstance(Object(Horde_Injector),
Object(ReflectionClass)) #7
/usr/share/php/Horde/Injector/Binder/AnnotatedSetters.php(69):
Horde_Injector_Binder_Implementation->create(Object(Horde_Injector)) #8
/usr/share/php/Horde/Injector.php(213):
Horde_Injector_Binder_AnnotatedSetters->create(Object(Horde_Injector)) #9
/usr/share/php/Horde/Injector.php(247):
Horde_Injector->createInstance('Trean_Bookmarks') #10
/var/www/trean/lib/Application.php(65):
Horde_Injector->getInstance('Trean_Bookmarks') #11
/usr/share/php/Horde/Registry/Application.php(105):
Trean_Application->_init() #12 [internal function]:
Horde_Registry_Application->init() #13
/usr/share/php/Horde/Registry.php(1174): call_user_func_array(Array, Array)
#14 /usr/share/php/Horde/Registry.php(1561):
Horde_Registry->callAppMethod('trean', 'init') #15
/usr/share/php/Horde/Registry.php(1921): Horde_Registry->pushApp('trean')
#16 /usr/share/php/Horde/Core/Block/Collection.php(43):
Horde_Registry->getAppDrivers('trean', 'Block') #17
/usr/share/php/Horde/Core/Factory/BlockCollection.php(61):
Horde_Core_Block_Collection->__construct(Array, 'portal_layout') #18
/var/www/services/portal/index.php(31):
Horde_Core_Factory_BlockCollection->create() #19 {main} Next exception
'Horde_Db_Exception' with message 'SQLSTATE[23000]: Integrity constraint
violation: 1062 Duplicate entry 'administrator' for key
'rampage_users_user_name'' in /usr/share/php/Horde/Db/Adapter/Base.php:555
Stack trace: #0 /usr/share/php/Horde/Db/Adapter/Base.php(584):
Horde_Db_Adapter_Base->execute('INSERT INTO `ra...', NULL, NULL) #1
/var/www/content/lib/Users/Manager.php(75):
Horde_Db_Adapter_Base->insert('INSERT INTO `ra...') #2
/var/www/trean/lib/Bookmarks.php(30):
Content_Users_Manager->ensureUsers('administrator') #3 [internal function]:
Trean_Bookmarks->__construct(Object(Content_Users_Manager)) #4
/usr/share/php/Horde/Injector/Binder/Implementation.php(86):
ReflectionClass->newInstanceArgs(Array) #5
/usr/share/php/Horde/Injector/Binder/Implementation.php(66):
Horde_Injector_Binder_Implementation->_getInstance(Object(Horde_Injector),
Object(ReflectionClass)) #6
/usr/share/php/Horde/Injector/Binder/AnnotatedSetters.php(69):
Horde_Injector_Binder_Implementation->create(Object(Horde_Injector)) #7
/usr/share/php/Horde/Injector.php(213):
Horde_Injector_Binder_AnnotatedSetters->create(Object(Horde_Injector)) #8
/usr/share/php/Horde/Injector.php(247):
Horde_Injector->createInstance('Trean_Bookmarks') #9
/var/www/trean/lib/Application.php(65):
Horde_Injector->getInstance('Trean_Bookmarks') #10
/usr/share/php/Horde/Registry/Application.php(105):
Trean_Application->_init() #11 [internal function]:
Horde_Registry_Application->init() #12
/usr/share/php/Horde/Registry.php(1174): call_user_func_array(Array, Array)
#13 /usr/share/php/Horde/Registry.php(1561):
Horde_Registry->callAppMethod('trean', 'init') #14
/usr/share/php/Horde/Registry.php(1921): Horde_Registry->pushApp('trean')
#15 /usr/share/php/Horde/Core/Block/Collection.php(43):
Horde_Registry->getAppDrivers('trean', 'Block') #16
/usr/share/php/Horde/Core/Factory/BlockCollection.php(61):
Horde_Core_Block_Collection->__construct(Array, 'portal_layout') #17
/var/www/services/portal/index.php(31):
Horde_Core_Factory_BlockCollection->create() #18 {main} Next exception
'Content_Exception' with message 'SQLSTATE[23000]: Integrity constraint
violation: 1062 Duplicate entry 'administrator' for key
'rampage_users_user_name'' in /var/www/content/lib/Users/Manager.php:78
Stack trace: #0 /var/www/trean/lib/Bookmarks.php(30):
Content_Users_Manager->ensureUsers('administrator') #1 [internal function]:
Trean_Bookmarks->__construct(Object(Content_Users_Manager)) #2
/usr/share/php/Horde/Injector/Binder/Implementation.php(86):
ReflectionClass->newInstanceArgs(Array) #3
/usr/share/php/Horde/Injector/Binder/Implementation.php(66):
Horde_Injector_Binder_Implementation->_getInstance(Object(Horde_Injector),
Object(ReflectionClass)) #4
/usr/share/php/Horde/Injector/Binder/AnnotatedSetters.php(69):
Horde_Injector_Binder_Implementation->create(Object(Horde_Injector)) #5
/usr/share/php/Horde/Injector.php(213):
Horde_Injector_Binder_AnnotatedSetters->create(Object(Horde_Injector)) #6
/usr/share/php/Horde/Injector.php(247):
Horde_Injector->createInstance('Trean_Bookmarks') #7
/var/www/trean/lib/Application.php(65):
Horde_Injector->getInstance('Trean_Bookmarks') #8
/usr/share/php/Horde/Registry/Application.php(105):
Trean_Application->_init() #9 [internal function]:
Horde_Registry_Application->init() #10
/usr/share/php/Horde/Registry.php(1174): call_user_func_array(Array, Array)
#11 /usr/share/php/Horde/Registry.php(1561):
Horde_Registry->callAppMethod('trean', 'init') #12
/usr/share/php/Horde/Registry.php(1921): Horde_Registry->pushApp('trean')
#13 /usr/share/php/Horde/Core/Block/Collection.php(43):
Horde_Registry->getAppDrivers('trean', 'Block') #14
/usr/share/php/Horde/Core/Factory/BlockCollection.php(61):
Horde_Core_Block_Collection->__construct(Array, 'portal_layout') #15
/var/www/services/portal/index.php(31):
Horde_Core_Factory_BlockCollection->create() #16 {main}Details have been
logged for the administrator.

I have tried to restore the conf.bak.php file and it didn't work. I tried
to remove the entire system and cover it with a previously save version, it
didn't work either.
Now I am out of help.

Please help me here.

Wayne


2013/9/1 Ralf Lang <lang at b1-systems.de>

> Hi Wayne,
>
> please keep discussions on the list :)
>
>
> On 01.09.2013 02:52, W Z wrote:
> > My apology Ralf. I left a typo in your name.
> >
> >
> > 2013/8/31 W Z <iamnewleon at gmail.com <mailto:iamnewleon at gmail.com>>
> >
> >     Ralk,
> >
> >     I am looking around for some manual/documentation for setting up
> >     authentication (LDAP,IMAP, or SQL)  backend.
> >     But it seems it is very limited and not very intuitive to me. The
> >     most I could get are from Horde wiki articles regards to
> >     authentation. But they are indeed very limited.
> >
> >     Could you please give me some idea where to look for relevant
> >     documents that can assist me in a step-by-step style ?
> >
> >     Thanks,
> >     Wayne
>
> You best point your browser to
> http://yoursite.com/admin/config/config.php?app=horde and go to the
> "authentication" tab.
>
> There you can fill in authentication details.
> Most important is the conf[auth][driver] dropdown
>
> For example, choose mysql, choose "horde defaults" in driver config and
> leave the following fields empty (default encryption is ssha). Hit the
> generate config button. Your horde/config/conf.php file will have
> changed, copying the old one to conf.php.bak. These files must have
> write access for the web-server user (in opensuse: wwwrun, in debian:
> www-data)
>
> Then go to the user config screen /admin/user.php and begin entering
> users. When you log out and back in, you will find yourself using the
> entered credentials.
>
> Please mind the conf[auth][admin] array which says which usernames
> should have admin privileges.
>
> Advanced users often directly edit the con.php file.
>
> When configuring the passwd application later on, mind backends.php for
> documentation and examples.
>
> I usually use this backends.local.php when the horde authentication is
> "sql" or "ldap":
>
> $backends['hordeauth'] = array(
>     'disabled' => true,
>     'name' => 'Horde Authentication',
>     'driver' => 'Horde',
>     'policy' => array(
>         'minLength' => 6,
>         'minNumeric' => 1,
>     ),
>     'logout' => true,
> );
>
> This delegates the actual work to the horde authentication driver.
> Backends php contains more info for custom sql, ldap, poppasd,
> postfixadmin, samba/cifs and other authentication scenarios and even
> http/rpc calls to remote servers.
>
> --
> Ralf Lang
> Linux Consultant / Developer
> Tel.: +49-170-6381563
> Mail: lang at b1-systems.de
> B1 Systems GmbH
> Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
> GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
>
>


More information about the horde mailing list