[p4] Duplicate user entries

Weintraub, David david.weintraub at bofasecurities.com
Mon Jul 3 11:47:59 PDT 2006


I would check a few things:

* Check the case of the names of the various users. In Perforce, case is
significant. Weintraub is a different user from weintraub who is a
different user from WEINTRAUB. In Windows, each of these names
represents the same user ID. Meanwhile, Perforce will automatically
create new users unless you specifically set up your protection table to
prevent this from happening (See <http://snipurl.com/so95> Preventing
Creation of Users).

* Make sure there are no trailing spaces in user IDs. It isn't easy to
do because if you use Perforce forms, it automatically makes trailing
spaces as an underscore. However, I was able to do it via p4perl. I had
to resort to the following Unix command to see the spaces:

	$ p4 -ztag users | awk '/^\.\.\. User/ {print "\"" substr($0,
10) "\""}'

This prints out the user's ID with quotes around each ID. Thus if there
is a trailing space, you'll see it inside the quotation marks.

* If you have determined that these Perforce users actually have exactly
the same matching ID, I suggest you call customer support immediately
because this is pointing to a bad Perforce database problem. Unlike
other database, the key to the database is the user ID number itself,
and not an underlying hidden ID (It's why you can't change someone's
user ID. You can only create a new user with the same attributes and
delete the old one). It might be possible to dump your database files to
a journal, and somehow munge the journal to correct the problem, but you
shouldn't do this without Perforce helping you out.

Does Perforce use Berkeley DB for its database, or is this a homegrown
database? If this is Berkeley DB, and they link dynamically to Berkeley
DB on Unix, I know that some versions of Berkeley DB have bugs that can
cause this problem. 

-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Laurent Giroud
Sent: Monday, July 03, 2006 12:52 PM
To: perforce-user at perforce.com
Subject: [p4] Duplicate user entries

Hi,
 
since a few days, we have a strange problem with perforce.
4 users out of our 80 license quota appear duplicated when using "p4
users"
to list all users.

Despite being under the 80 actual users number, this causes one of our
users to get a "quota license exceeded" error message.
And indeed, "p4 users | wc -l" returns 80 as a result.

As a first test to overcome the problem I have deleted one of those
duplicate users : the first duplicate is deleted without problem,
however after that, "p4 user -d username" yields a "user doesn't exist",
even though the name still appears when using "p4 users".

Recreating the deleted user allows him to work normally without problem.

I haven't been able to find anything about such a problem in the user &
administration documentation, nor on the perforce-users list and even on
google.
I have seen a few thing about duplicates after depots merging, but we
have only one depot and never merged it with another.

Would anyone have any clue ?

I'd gladly contact perforce support, but our license currently does not
include support so it's not an option for the moment :(

Thanks in advance if anyone has an idea.

Regards,
Laurent
--
Laurent Giroud, lgiroud at edengames.com

_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user



More information about the perforce-user mailing list