Create users and tickets for external services

P4 Server requires users and tickets for external services. If you configure P4 Search with a script (Linux only), these are set up automatically. See Configure P4 Search for the first time.

If you choose to install P4 Search manually, you must create the P4 users and tickets yourself.

About P4 users

P4 Server requires at least one P4 user:

  • Perforce Service user: A Standard or Service user with a minimum of admin access. Used to authorize the proxy connection at Security level 5 and above. To learn more about creating the Perforce Service user and printing out the ticket, see P4 Server requirements.
  • (Optional:) P4 Index user: A Standard user with super access. Used to read content from the P4 Server, to set file attributes, and to install extensions. For instructions on creating the Perforce Index user and printing out the ticket, see P4 Server requirements. If the Index user is not defined, the Perforce Service user is used.

User requirements at different security levels

At Security level 6 (or Security level 5, when using service specifications):

  • The P4 Index user must be of type 'standard' with super permissions.

  • The P4 Service user must be of type 'service' with admin permissions.

    • The long-lived ticket must be a local ticket and not an all-hosts ticket.

  • The P4 Server must have a valid server spec with the AllowedAddresses field set. To learn more about Security level 6, see Server security levels in the P4 Server Administration Documentation.

At lower security levels:

  • The P4 Index user must be of type 'standard' with super permissions.

  • You can use the same P4 user for both the Index user and Service user.

  • If you are using a different P4 Service user, then it must be of type 'standard' with admin permissions.

Create the P4 Service user and ticket

The Service user can be a Standard or Service user with a minimum of admin permissions to authorize the proxy connection at Security level 5 and above.

The Service user name and ticket details are required when you set the following configurations:

  • com.perforce.p4search.core.service.p4user

  • com.perforce.p4search.core.service.p4ticket

Check the user requirements at your security level before creating the Service user.
  1. On your P4 Server, create the user:

  2. p4 user -f p4search

  3. Create a group with unlimited timeouts and add the user to the group. For example:

    1. Create a group called unlimited:

    2. p4 group unlimited

    3. Edit the group spec to change Timeout to unlimited.

    4. Edit the group spec to add the p4search user to the group.

  4. Open user protections form:

    p4 protect

  5. Give the p4search user admin permissions by adding the following entry to the form:

  6. admin user p4search * //...

  7. Set the password:

  8. p4 -u p4search passwd

  9. Get a ticket for the user with one of the following commands based on the on the security level of the P4 Server:

    • Security level 4 and below: create an all hosts ticket:

    • p4 -u p4search login -ap

    • Security level 5 and above: create a local host ticket:

    • p4 -u p4search login -p

  10. Make a note of the p4search user name and ticket details.

Create the P4 Index user and ticket

The Index user must have super permissions to read content from P4 Server, to set file attributes, and to install extensions. If the Index user is undefined, the Perforce Service user is used.

The Index user name and ticket details are required when you set the following configurations:

  • com.perforce.p4search.core.index.p4user

  • com.perforce.p4search.core.index.p4ticket

Check the user requirements at your security level before creating the Index user.
  1. On your P4 Server, create the Index user:

  2. p4 user -f p4index

  3. Create a group with unlimited timeouts and add the user to the group. For example:

    1. Create a group called unlimited:

    2. p4 group unlimited

    3. Edit the group spec to change Timeout to unlimited.

    4. Edit the group spec to add the p4index user to the group.

  4. Open user protections form:

    p4 protect

  5. Give the p4index user super permissions by adding the following entry to the form:

  6. super user p4index * //...

  7. Set the password:

  8. p4 -u p4index passwd

  9. Get a ticket for the user:

  10. p4 -u p4index login -ap

  11. Make a note of the p4index user name and ticket details.

Related topics