Preventing Accidental User Creation

Info & Tags

Article #:
39
Created:
04/16/07
Modified:
07/16/08
Tags:
groups, protections, user creation, users

Related Articles

Links

  1. Perforce System Administrator's Guide
    Documentation
  2. Protections
    Perforce System Administrator's Guide
  3. p4 group
    Perforce Command Reference
  4. p4 protect
    Perforce Command Reference

PROBLEM

How do I prevent new users from being created accidentally?

SOLUTION

As of Rel 98.2, Perforce groups can be used to control user access. Normally, Perforce creates a new user in its database whenever a command is issued by a username it has not seen before. A Perforce superuser can disable the creation of new users by assigning all authorized users to a group, and permitting access to the authorized group only.

You can create a group with:

p4 group groupname

Use p4 protect to edit the protections table and deny access to users not in the authorized group. For example, the default protections which look like:

write user * * //...

should be changed to:

write group groupname * //...

Please note that any lines in the protections table that specify "user *" will allow the automatic creation of a user. This applies to exclusionary mappings as well. All protections must be by group (such as "group *" or "group groupname") or by specifying a particular user (eg. "user joe") if you want to avoid automatic user creation.

For more information on protections, review the chapter on "Protections" in the Perforce System Administrator's Guide.