users duplicating themselves?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

users duplicating themselves?

Jason alavaliant
I've run into an interesting problem with my davical 0.9.9 (centos 5, users via ldap) server in the last week.       Users are somehow getting duplicated and in some cases I've seen 200+ entries for a single username occur.    I've deleted that principal and manually cleaned up the database as best I could but it then starts occurring with another user.   (always seems to be users logging in for the first time and having their ldap settings imported but then davical continues to import them again and again). So I get a bunch of principals with different ids but the same username and other details

  The most relevant thing I've managed to find in the logs is;
(for privacy reasons I've replaced the real username with bsmith etc)

[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] DAViCal: LOG: Login: Query: Error: QF in '/usr/share/davical/inc/auth-functions.php' on line 119
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] DAViCal: LOG: Login: Query: QF: SQL error "23505" - ERROR: duplicate key value violates unique constraint "usr_sk1_unique_username""
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] DAViCal: LOG: Login: Query: Error: QF in '/usr/share/davical/inc/auth-functions.php' on line 119
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] DAViCal: LOG: Login: Query: QF: INSERT INTO usr (user_no, updated, username, fullname, email) VALUES( 3184, '2009-04-14 02:22:53'::timestamptz, 'bsmith', 'Bob Smith', '[hidden email]' );
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] PHP Notice:  Trying to get property of non-object in /usr/share/davical/inc/auth-functions.php on line 42
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] PHP Notice:  Trying to get property of non-object in /usr/share/davical/inc/auth-functions.php on line 46
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] PHP Notice:  Trying to get property of non-object in /usr/share/davical/inc/auth-functions.php on line 50
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] PHP Notice:  Undefined property:  HTTPAuthSession::$principal_id in /usr/share/davical/inc/DAVResource.php on line 322
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] PHP Notice:  Undefined property:  HTTPAuthSession::$principal_id in /usr/share/davical/inc/DAVResource.php on line 322
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] PHP Notice:  Undefined property:  HTTPAuthSession::$principal_id in /usr/share/davical/inc/DAVResource.php on line 322
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] DAViCal: LOG: Login: Query: Error: QF in '/usr/share/davical/inc/auth-functions.php' on line 119
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] DAViCal: LOG: Login: Query: QF: SQL error "23505" - ERROR: duplicate key value violates unique constraint "usr_sk1_unique_username""
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] DAViCal: LOG: Login: Query: Error: QF in '/usr/share/davical/inc/auth-functions.php' on line 119
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] DAViCal: LOG: Login: Query: QF: INSERT INTO usr (user_no, updated, username, fullname, email) VALUES( 3185, '2009-04-14 02:22:53'::timestamptz, 'bsmith', 'Bob Smith', '[hidden email]' );
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] PHP Notice:  Trying to get property of non-object in /usr/share/davical/inc/auth-functions.php on line 42
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] PHP Notice:  Trying to get property of non-object in /usr/share/davical/inc/auth-functions.php on line 46
[Mon Jul 19 18:27:54 2010] [error] [client 192.168.117.112] PHP Notice:  Trying to get property of non-object in /usr/share/davical/inc/auth-functions.php on line 50

(you can see with the inserts there, the same username has been added again each time with a newer id number.    This was account 50 or so for this user when I found this in the log.)

Has anybody seen anything like this before?   I'm rather confused as to how the code is adding a duplicate entry with the same username if it's violating a unique field,  I would have thought the database would prevent that?    If there is a particular bit of information from the database that would help or another bit of logging I could provide let me know.    Any suggestions welcome.

Thanks
Jason

p.s.    This wasn't occurring a few weeks ago,  I was on 0.8.3 then but upgrading to 0.9.9 didn't help.   At the time the issue started we had just moved from a debian stable server to the centos 5.4 server to host davical (same backend postgres server), at the same time we deployed thunderbird 3.1 + lightning 1.0b2 network wide which increased the number of users logging into the davical server 80%+    So it's hard to be sure if the move to centos is what started this or the lightning 1.0b2 rollout.     Particular hard as I've found no way to replicate it on demand so I can't try to isolate it.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general
kmv
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

kmv
You wouldn't happen to be running PHP v5.3 would you?


Regards,
Keith.


On 19 Jul 2010, at 10:37, Jason alavaliant wrote:

> I've run into an interesting problem with my davical 0.9.9 (centos 5, users via ldap) server in the last week.       Users are somehow getting duplicated and in some cases I've seen 200+ entries for a single username occur.    I've deleted that principal and manually cleaned up the database as best I could but it then starts occurring with another user.   (always seems to be users logging in for the first time and having their ldap settings imported but then davical continues to import them again and again). So I get a bunch of principals with different ids but the same username and other details
>
[cut]

> p.s.    This wasn't occurring a few weeks ago,  I was on 0.8.3 then but upgrading to 0.9.9 didn't help.   At the time the issue started we had just moved from a debian stable server to the centos 5.4 server to host davical (same backend postgres server), at the same time we deployed thunderbird 3.1 + lightning 1.0b2 network wide which increased the number of users logging into the davical server 80%+    So it's hard to be sure if the move to centos is what started this or the lightning 1.0b2 rollout.     Particular hard as I've found no way to replicate it on demand so I can't try to isolate it.





------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

Jason alavaliant
Nope,   according to both the rpms and the phpinfo on the setup page it's php 5.1.6

On Mon, Jul 19, 2010 at 10:17 PM, Keith Smith <[hidden email]> wrote:
You wouldn't happen to be running PHP v5.3 would you?


Regards,
Keith.


On 19 Jul 2010, at 10:37, Jason alavaliant wrote:

> I've run into an interesting problem with my davical 0.9.9 (centos 5, users via ldap) server in the last week.       Users are somehow getting duplicated and in some cases I've seen 200+ entries for a single username occur.    I've deleted that principal and manually cleaned up the database as best I could but it then starts occurring with another user.   (always seems to be users logging in for the first time and having their ldap settings imported but then davical continues to import them again and again). So I get a bunch of principals with different ids but the same username and other details
>
[cut]

> p.s.    This wasn't occurring a few weeks ago,  I was on 0.8.3 then but upgrading to 0.9.9 didn't help.   At the time the issue started we had just moved from a debian stable server to the centos 5.4 server to host davical (same backend postgres server), at the same time we deployed thunderbird 3.1 + lightning 1.0b2 network wide which increased the number of users logging into the davical server 80%+    So it's hard to be sure if the move to centos is what started this or the lightning 1.0b2 rollout.     Particular hard as I've found no way to replicate it on demand so I can't try to isolate it.






------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

Jason alavaliant
Interestingly it did turn out to be a php problem though - I installed some php 5.2.10 rpms and they problem has gone away.    Also at the same time a person that was getting odd errors in iCal stopped getting them (I was initially thinking it was just their iCal prefs being bad but now I wonder if it was again something slightly odd with davical and php 5.1.6 on centos).

On Tue, Jul 20, 2010 at 9:48 AM, Jason alavaliant <[hidden email]> wrote:
Nope,   according to both the rpms and the phpinfo on the setup page it's php 5.1.6


On Mon, Jul 19, 2010 at 10:17 PM, Keith Smith <[hidden email]> wrote:
You wouldn't happen to be running PHP v5.3 would you?


Regards,
Keith.


On 19 Jul 2010, at 10:37, Jason alavaliant wrote:

> I've run into an interesting problem with my davical 0.9.9 (centos 5, users via ldap) server in the last week.       Users are somehow getting duplicated and in some cases I've seen 200+ entries for a single username occur.    I've deleted that principal and manually cleaned up the database as best I could but it then starts occurring with another user.   (always seems to be users logging in for the first time and having their ldap settings imported but then davical continues to import them again and again). So I get a bunch of principals with different ids but the same username and other details
>
[cut]

> p.s.    This wasn't occurring a few weeks ago,  I was on 0.8.3 then but upgrading to 0.9.9 didn't help.   At the time the issue started we had just moved from a debian stable server to the centos 5.4 server to host davical (same backend postgres server), at the same time we deployed thunderbird 3.1 + lightning 1.0b2 network wide which increased the number of users logging into the davical server 80%+    So it's hard to be sure if the move to centos is what started this or the lightning 1.0b2 rollout.     Particular hard as I've found no way to replicate it on demand so I can't try to isolate it.







------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

Jason alavaliant
I'll have to retract that,  it looked the problem had gone but it looks like it's just reduced in occurrence.    Now rather than 3 or 4 users gaining duplicate accounts at once it's only ever one user at a time that does it.   Normally takes a day or two between each occurrence before the next account starts duplicating as well.    

On Thu, Jul 22, 2010 at 10:54 AM, Jason alavaliant <[hidden email]> wrote:
Interestingly it did turn out to be a php problem though - I installed some php 5.2.10 rpms and they problem has gone away.    Also at the same time a person that was getting odd errors in iCal stopped getting them (I was initially thinking it was just their iCal prefs being bad but now I wonder if it was again something slightly odd with davical and php 5.1.6 on centos).


On Tue, Jul 20, 2010 at 9:48 AM, Jason alavaliant <[hidden email]> wrote:
Nope,   according to both the rpms and the phpinfo on the setup page it's php 5.1.6


On Mon, Jul 19, 2010 at 10:17 PM, Keith Smith <[hidden email]> wrote:
You wouldn't happen to be running PHP v5.3 would you?


Regards,
Keith.


On 19 Jul 2010, at 10:37, Jason alavaliant wrote:

> I've run into an interesting problem with my davical 0.9.9 (centos 5, users via ldap) server in the last week.       Users are somehow getting duplicated and in some cases I've seen 200+ entries for a single username occur.    I've deleted that principal and manually cleaned up the database as best I could but it then starts occurring with another user.   (always seems to be users logging in for the first time and having their ldap settings imported but then davical continues to import them again and again). So I get a bunch of principals with different ids but the same username and other details
>
[cut]

> p.s.    This wasn't occurring a few weeks ago,  I was on 0.8.3 then but upgrading to 0.9.9 didn't help.   At the time the issue started we had just moved from a debian stable server to the centos 5.4 server to host davical (same backend postgres server), at the same time we deployed thunderbird 3.1 + lightning 1.0b2 network wide which increased the number of users logging into the davical server 80%+    So it's hard to be sure if the move to centos is what started this or the lightning 1.0b2 rollout.     Particular hard as I've found no way to replicate it on demand so I can't try to isolate it.








------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

Gurvinder Singh
I have the issue with the duplicating users too at my at debian lenny using php5(5.2.14-0.dotdeb.0). However I have put the check on the ldap_drivers.php, which avoids creating multiple users. But this temporary solution does not stop davical from trying to create multiple users with same user name. I am wondering is this Davical problem or php. If any one using davical on debian lenny, then please can you share with us the detail of php version.

Thanks,
Gurvinder
On 08/11/2010 12:24 AM, Jason alavaliant wrote:
I'll have to retract that,  it looked the problem had gone but it looks like it's just reduced in occurrence.    Now rather than 3 or 4 users gaining duplicate accounts at once it's only ever one user at a time that does it.   Normally takes a day or two between each occurrence before the next account starts duplicating as well.    

On Thu, Jul 22, 2010 at 10:54 AM, Jason alavaliant <[hidden email]> wrote:
Interestingly it did turn out to be a php problem though - I installed some php 5.2.10 rpms and they problem has gone away.    Also at the same time a person that was getting odd errors in iCal stopped getting them (I was initially thinking it was just their iCal prefs being bad but now I wonder if it was again something slightly odd with davical and php 5.1.6 on centos).


On Tue, Jul 20, 2010 at 9:48 AM, Jason alavaliant <[hidden email]> wrote:
Nope,   according to both the rpms and the phpinfo on the setup page it's php 5.1.6

[hidden email]
On Mon, Jul 19, 2010 at 10:17 PM, Keith Smith <[hidden email]> wrote:
You wouldn't happen to be running PHP v5.3 would you?


Regards,
Keith.


On 19 Jul 2010, at 10:37, Jason alavaliant wrote:

> I've run into an interesting problem with my davical 0.9.9 (centos 5, users via ldap) server in the last week.       Users are somehow getting duplicated and in some cases I've seen 200+ entries for a single username occur.    I've deleted that principal and manually cleaned up the database as best I could but it then starts occurring with another user.   (always seems to be users logging in for the first time and having their ldap settings imported but then davical continues to import them again and again). So I get a bunch of principals with different ids but the same username and other details
>
[cut]

> p.s.    This wasn't occurring a few weeks ago,  I was on 0.8.3 then but upgrading to 0.9.9 didn't help.   At the time the issue started we had just moved from a debian stable server to the centos 5.4 server to host davical (same backend postgres server), at the same time we deployed thunderbird 3.1 + lightning 1.0b2 network wide which increased the number of users logging into the davical server 80%+    So it's hard to be sure if the move to centos is what started this or the lightning 1.0b2 rollout.     Particular hard as I've found no way to replicate it on demand so I can't try to isolate it.







------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________ rscds-general mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/rscds-general


------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

Andrew McMillan
On Wed, 2010-08-11 at 08:18 +0200, Gurvinder Singh wrote:
> I have the issue with the duplicating users too at my at debian lenny
> using php5(5.2.14-0.dotdeb.0). However I have put the check on the
> ldap_drivers.php, which avoids creating multiple users. But this
> temporary solution does not stop davical from trying to create
> multiple users with same user name. I am wondering is this Davical
> problem or php. If any one using davical on debian lenny, then please
> can you share with us the detail of php version.

It sounds like the LDAP query you have configured in DAViCal does not
return a unique ID.  DAViCal should not create a new user if it finds
one that already exists with the same unique ID, so I wonder if you have
something wrong in your LDAP <-> DAViCal field mapping.

Cheers,
                                        Andrew.

>
> Thanks,
> Gurvinder
> On 08/11/2010 12:24 AM, Jason alavaliant wrote:
> > I'll have to retract that,  it looked the problem had gone but it
> > looks like it's just reduced in occurrence.    Now rather than 3 or
> > 4 users gaining duplicate accounts at once it's only ever one user
> > at a time that does it.   Normally takes a day or two between each
> > occurrence before the next account starts duplicating as well.    
> >
> > On Thu, Jul 22, 2010 at 10:54 AM, Jason alavaliant
> > <[hidden email]> wrote:
> >         Interestingly it did turn out to be a php problem though - I
> >         installed some php 5.2.10 rpms and they problem has gone
> >         away.    Also at the same time a person that was getting odd
> >         errors in iCal stopped getting them (I was initially
> >         thinking it was just their iCal prefs being bad but now I
> >         wonder if it was again something slightly odd with davical
> >         and php 5.1.6 on centos).
> >        
> >        
> >         On Tue, Jul 20, 2010 at 9:48 AM, Jason alavaliant
> >         <[hidden email]> wrote:
> >                 Nope,   according to both the rpms and the phpinfo
> >                 on the setup page it's php 5.1.6
> >                
> >                 [hidden email]
> >                 On Mon, Jul 19, 2010 at 10:17 PM, Keith Smith
> >                 <[hidden email]> wrote:
> >                         You wouldn't happen to be running PHP v5.3
> >                         would you?
> >                        
> >                        
> >                         Regards,
> >                         Keith.
> >                        
> >                        
> >                         On 19 Jul 2010, at 10:37, Jason alavaliant
> >                         wrote:
> >                        
> >                         > I've run into an interesting problem with
> >                         my davical 0.9.9 (centos 5, users via ldap)
> >                         server in the last week.       Users are
> >                         somehow getting duplicated and in some cases
> >                         I've seen 200+ entries for a single username
> >                         occur.    I've deleted that principal and
> >                         manually cleaned up the database as best I
> >                         could but it then starts occurring with
> >                         another user.   (always seems to be users
> >                         logging in for the first time and having
> >                         their ldap settings imported but then
> >                         davical continues to import them again and
> >                         again). So I get a bunch of principals with
> >                         different ids but the same username and
> >                         other details
> >                         >
> >                        
> >                         [cut]
> >                        
> >                         > p.s.    This wasn't occurring a few weeks
> >                         ago,  I was on 0.8.3 then but upgrading to
> >                         0.9.9 didn't help.   At the time the issue
> >                         started we had just moved from a debian
> >                         stable server to the centos 5.4 server to
> >                         host davical (same backend postgres server),
> >                         at the same time we deployed thunderbird 3.1
> >                         + lightning 1.0b2 network wide which
> >                         increased the number of users logging into
> >                         the davical server 80%+    So it's hard to
> >                         be sure if the move to centos is what
> >                         started this or the lightning 1.0b2 rollout.
> >                         Particular hard as I've found no way to
> >                         replicate it on demand so I can't try to
> >                         isolate it.
> >                        
> >                        
> >                        
> >                        
> >                        
> >                
> >                
> >        
> >        
> >
> >
> > ------------------------------------------------------------------------------
> > This SF.net email is sponsored by
> >
> > Make an app they can't live without
> > Enter the BlackBerry Developer Challenge
> > http://p.sf.net/sfu/RIM-dev2dev 
> >
> > _______________________________________________
> > rscds-general mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/rscds-general
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev 
> _______________________________________________ rscds-general mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/rscds-general
--
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com                            +64(272)DEBIAN
              Does the turtle move for you?  www.kame.net
------------------------------------------------------------------------


------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

Jens Zahner
Am 13.08.2010 um 03:57 schrieb Andrew McMillan:

> On Wed, 2010-08-11 at 08:18 +0200, Gurvinder Singh wrote:
>> I have the issue with the duplicating users too at my at debian lenny
>> using php5(5.2.14-0.dotdeb.0). However I have put the check on the
>> ldap_drivers.php, which avoids creating multiple users. But this
>> temporary solution does not stop davical from trying to create
>> multiple users with same user name. I am wondering is this Davical
>> problem or php. If any one using davical on debian lenny, then please
>> can you share with us the detail of php version.
>
> It sounds like the LDAP query you have configured in DAViCal does not
> return a unique ID.  DAViCal should not create a new user if it finds
> one that already exists with the same unique ID, so I wonder if you have
> something wrong in your LDAP <-> DAViCal field mapping.
>

It's not a bug in the field mapping, it's a bug in the drivers_ldap.php, that occurs if a user is a member in no group and if he is a member in just one group. The user update fails because the list of groups supplied by LDAP is not an array...

We ran into the same problem and were able to fix it, take a closer look at the patch my colleague posted on this list.
[Mesage-ID: [hidden email], Subject: few patches for drivers_ldap / ldap group import]


Greetings,
Jens


--
Jens Zahner
CIO / Leiter IT
Telefon: +49-(0)641-4006-155
Fax: +49-(0)641-4006-6-155
[hidden email]
http://www.servicereisen.de


SERVICE-REISEN Heyne GmbH & Co. KG
Rödgener Str. 12, 35394 Giessen

eingetragen beim AG Giessen HRA 1333
persönlich haftende Gesellschafterin:
Heyne GmbH, eingetragen beim AG Giessen HRB 2163
Geschäftsführer: Kristiane Heyne-Strauch, Karl Heyne
------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

Andrew McMillan
On Fri, 2010-08-13 at 09:10 +0200, Jens Zahner wrote:

> Am 13.08.2010 um 03:57 schrieb Andrew McMillan:
>
> > On Wed, 2010-08-11 at 08:18 +0200, Gurvinder Singh wrote:
> >> I have the issue with the duplicating users too at my at debian lenny
> >> using php5(5.2.14-0.dotdeb.0). However I have put the check on the
> >> ldap_drivers.php, which avoids creating multiple users. But this
> >> temporary solution does not stop davical from trying to create
> >> multiple users with same user name. I am wondering is this Davical
> >> problem or php. If any one using davical on debian lenny, then please
> >> can you share with us the detail of php version.
> >
> > It sounds like the LDAP query you have configured in DAViCal does not
> > return a unique ID.  DAViCal should not create a new user if it finds
> > one that already exists with the same unique ID, so I wonder if you have
> > something wrong in your LDAP <-> DAViCal field mapping.
> >
>
> It's not a bug in the field mapping, it's a bug in the
> drivers_ldap.php, that occurs if a user is a member in no group and if
> he is a member in just one group. The user update fails because the
> list of groups supplied by LDAP is not an array...
>
> We ran into the same problem and were able to fix it, take a closer
> look at the patch my colleague posted on this list.
> [Mesage-ID: [hidden email], Subject: few patches
> for drivers_ldap / ldap group import]
Ah, OK thanks - I'd missed that message, and not being a user of LDAP I
tend to know very little about it.

Regards,
                                        Andrew.

--
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com                            +64(272)DEBIAN
          Q: What's tan and black and looks great on a lawyer?
                             A: A doberman.

------------------------------------------------------------------------


------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

Jason alavaliant
In reply to this post by Jens Zahner


On Fri, Aug 13, 2010 at 7:10 PM, Jens Zahner <[hidden email]> wrote:
Am 13.08.2010 um 03:57 schrieb Andrew McMillan:

> On Wed, 2010-08-11 at 08:18 +0200, Gurvinder Singh wrote:
>> I have the issue with the duplicating users too at my at debian lenny
>> using php5(5.2.14-0.dotdeb.0). However I have put the check on the
>> ldap_drivers.php, which avoids creating multiple users. But this
>> temporary solution does not stop davical from trying to create
>> multiple users with same user name. I am wondering is this Davical
>> problem or php. If any one using davical on debian lenny, then please
>> can you share with us the detail of php version.
>
> It sounds like the LDAP query you have configured in DAViCal does not
> return a unique ID.  DAViCal should not create a new user if it finds
> one that already exists with the same unique ID, so I wonder if you have
> something wrong in your LDAP <-> DAViCal field mapping.
>

It's not a bug in the field mapping, it's a bug in the drivers_ldap.php, that occurs if a user is a member in no group and if he is a member in just one group. The user update fails because the list of groups supplied by LDAP is not an array...

We ran into the same problem and were able to fix it, take a closer look at the patch my colleague posted on this list.
[Mesage-ID: [hidden email], Subject: few patches for drivers_ldap / ldap group import]


Greetings,
Jens



Thanks for that,  it certainly does sound like the fix I need.   I've applied it to my install and so far it's been one day with no duplicates so looking promising.

-J
 


------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

Jason alavaliant


On Tue, Aug 17, 2010 at 10:10 AM, Jason alavaliant <[hidden email]> wrote:


On Fri, Aug 13, 2010 at 7:10 PM, Jens Zahner <[hidden email]> wrote:
Am 13.08.2010 um 03:57 schrieb Andrew McMillan:

> On Wed, 2010-08-11 at 08:18 +0200, Gurvinder Singh wrote:
>> I have the issue with the duplicating users too at my at debian lenny
>> using php5(5.2.14-0.dotdeb.0). However I have put the check on the
>> ldap_drivers.php, which avoids creating multiple users. But this
>> temporary solution does not stop davical from trying to create
>> multiple users with same user name. I am wondering is this Davical
>> problem or php. If any one using davical on debian lenny, then please
>> can you share with us the detail of php version.
>
> It sounds like the LDAP query you have configured in DAViCal does not
> return a unique ID.  DAViCal should not create a new user if it finds
> one that already exists with the same unique ID, so I wonder if you have
> something wrong in your LDAP <-> DAViCal field mapping.
>

It's not a bug in the field mapping, it's a bug in the drivers_ldap.php, that occurs if a user is a member in no group and if he is a member in just one group. The user update fails because the list of groups supplied by LDAP is not an array...

We ran into the same problem and were able to fix it, take a closer look at the patch my colleague posted on this list.
[Mesage-ID: [hidden email], Subject: few patches for drivers_ldap / ldap group import]


Greetings,
Jens



Thanks for that,  it certainly does sound like the fix I need.   I've applied it to my install and so far it's been one day with no duplicates so looking promising.

-J
 



Looks like that patch doesn't fix all cases or it's another bug with similar symptoms I'm running into.    I had two users start duplicating over the weekend.   one reached 563 accounts and the other 380 before we noticed and deleted all the duplicates.   I've double checked and the patch you mentioned is definitely applied.

Andrew if you don't know enough about ldap to stop fix this could you possibly look at adding stronger validation to the database so that attempts to create an account using the same username as an existing one fail?  (I'm presuming there should never be a valid reason for two accounts with the same username and it's avoids certain oddities such as the delete principal button in the web interface deleting all other accounts with the same username when you go to delete one of them (despite them having different ids)  and which of the many accounts does caldav.php/username/home/  end up accessing if there are 500 accounts with the same username?)   That would atleast stop the major fallout we get from these duplications where the server is too slow to respond to iCal so it timesout once we pass 1200 active accounts.

Thanks
-J


------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

Jens Zahner
Hello Jason,
 
2010/08/23 um 00:57 wrote Jason alavaliant <[hidden email]>:

On Tue, Aug 17, 2010 at 10:10 AM, Jason alavaliant <[hidden email]> wrote:

...

Looks like that patch doesn't fix all cases or it's another bug with similar symptoms I'm running into.    I had two users start duplicating over the weekend.   one reached 563 accounts and the other 380 before we noticed and deleted all the duplicates.   I've double checked and the patch you mentioned is definitely applied.

I found some other race conditions in the ldap driver, currengly we are doings the tests and I we can be sure our patches are working correctly, I'll publish another patch. The list of race conditions/problems, that we were able to identify:

- davical handles email addresses case sensitive in some parts, this causes problems in combination with iCal on Mac
=> I have fixed these issues in the davical code, patch will be released today.

- changeing group membership in ldap can produce a user duplication as well. 
=> We are testing the patch allready.

- The primary group membership in ldap is not supported in the davical ldap driver currently, to fix this a lot of coding has to be done or even a rewrite of the ldap driver... I'm working on this issue

So far Jens
-- 
(written on iPhone)

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

Andrew McMillan
On Mon, 2010-08-23 at 07:31 +0200, Jens Zahner wrote:


>
> I found some other race conditions in the ldap driver, currengly we
> are doings the tests and I we can be sure our patches are working
> correctly, I'll publish another patch. The list of race
> conditions/problems, that we were able to identify:
>
>
> - davical handles email addresses case sensitive in some parts, this
> causes problems in combination with iCal on Mac
> => I have fixed these issues in the davical code, patch will be
> released today.
Strictly speaking, the left-hand-side of an e-mail address might be
case-sensitive. The right-hand-side must be case-insensitive, because it
is a domain name, and domain names are case insensitive.

ISTR putting an option in somewhere for case insensitive e-mail checks,
if people wish DAViCal to make the assumption that all e-mail addresses
are case-insensitive.


> - changeing group membership in ldap can produce a user duplication as
> well.
> => We are testing the patch already.
>
>
> - The primary group membership in ldap is not supported in the davical
> ldap driver currently, to fix this a lot of coding has to be done or
> even a rewrite of the ldap driver... I'm working on this issue

Note that your previous patch has been applied +/- some changes, so you
may wish to make your changes against the drivers_ldap.php from Git in
order that I can apply it more straightforwardly.

http://repo.or.cz/w/davical.git/blob/HEAD:/inc/drivers_ldap.php

There should not be any other changes to that file that would be
incompatible with 0.9.9.

Thanks,
                                        Andrew McMillan.

--
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com                            +64(272)DEBIAN
 Don't look now, but there is a multi-legged creature on your shoulder.
------------------------------------------------------------------------


------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: users duplicating themselves?

Gurvinder Singh
I was facing the similar issue with the davical. After applying the patch "Subject: few patches for drivers_ldap / ldap group import]", I still found some users were duplicating. Then I look at my ldap config details and found out that the config option

"user_no" => "uidNumber" ,  // set DAViCal user no to match Unix uid from LDAP

was causing it. I removed this option and after that i didn't face the issue of duplicating users. So the configuration for ldpap now looks like

$c->authenticate_hook['config'] = array(
     'host' => 'ldap.example.com',
     'port' => '389',
     'filterUsers' => 'objectclass=top',    // we need this to successfully search users
     'baseDNUsers' => 'cn=internal,dc=example,dc=com',  // most orgs have more fields
     'protocolVersion' => 3,
     'mapping_field' => array("username" => "uid",
                              "updated" => "modifyTimestamp",
                              "fullname" => "cn" ,  // "Common Name"
                              "email" => "mail"
                              ), //used to create the user based on his LDAP properties
     'format_updated'=> array('Y' => array(0,4),
                              'm' => array(4,2),
                              'd' => array(6,2),
                              'H' => array(8,2),
                              'M' => array(10,2),
                              'S' => array(12,2)), // map LDAP "modifyTimestamp" field to SQL "updated" field
   );

- Gurvinder
On 08/23/2010 08:20 AM, Andrew McMillan wrote:
On Mon, 2010-08-23 at 07:31 +0200, Jens Zahner wrote:


I found some other race conditions in the ldap driver, currengly we
are doings the tests and I we can be sure our patches are working
correctly, I'll publish another patch. The list of race
conditions/problems, that we were able to identify:


- davical handles email addresses case sensitive in some parts, this
causes problems in combination with iCal on Mac
=> I have fixed these issues in the davical code, patch will be
released today.
Strictly speaking, the left-hand-side of an e-mail address might be
case-sensitive. The right-hand-side must be case-insensitive, because it
is a domain name, and domain names are case insensitive.

ISTR putting an option in somewhere for case insensitive e-mail checks,
if people wish DAViCal to make the assumption that all e-mail addresses
are case-insensitive.


- changeing group membership in ldap can produce a user duplication as
well. 
=> We are testing the patch already.


- The primary group membership in ldap is not supported in the davical
ldap driver currently, to fix this a lot of coding has to be done or
even a rewrite of the ldap driver... I'm working on this issue
Note that your previous patch has been applied +/- some changes, so you
may wish to make your changes against the drivers_ldap.php from Git in
order that I can apply it more straightforwardly.

http://repo.or.cz/w/davical.git/blob/HEAD:/inc/drivers_ldap.php

There should not be any other changes to that file that would be
incompatible with 0.9.9.

Thanks,
					Andrew McMillan.

------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________ rscds-general mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/rscds-general


------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
rscds-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/rscds-general