Step 5: Configure security | Admin

Secure your P4 Server to prevent unauthorized access. If your server is not secured, you could expose your organization to serious risks.

Customers are responsible for the security hardening of their Perforce software.

To learn more about securing your server, review Secure the server in P4 Server Administration Documentation.

You use P4 Admin for the following steps. If you did not install P4 Admin earlier, download and install it.

Set the server ID

You must set a server ID for the P4 Server. This creates a unique ID for the server configuration data to be stored in the P4 Server. The server ID can be anything you want, but it must be unique.

  1. From a command line, run:

    p4 serverid serverID

  2. Close P4 Admin (File > Exit).

  3. Restart P4 Admin.

Set the server security level

Set the server security level to enforce server-wide password usage requirements, password strength enforcement, and supported methods of user/server authentication.

  1. In P4 Admin, click the Configurables tab.

  2. Double-click the security configurable to open it.

  3. In the security dialog box, set the New value field to 4.

    This security level enforces strong password rules and access controls.

    Set the value to 4 or higher because this level protects standalone, multi-server, and replicated environments. To learn more about server security levels, see Server security levels in P4 Server Administration Documentation.
  4. Click Set.

    The security level is set.

Change the super user password

Change the password for the super user in P4V at any time after setting up server security.

Passwords must be at least eight characters and must contain uppercase and lowercase letters, and one or more special characters or numbers.

  1. In P4V, choose Connection > Change Password.

  2. In the Change Password dialog box, enter the old and new passwords.

  3. Confirm ther new password.

  4. Click OK.

    The new password is saved and required the next time you log in to P4V.

Strengthen security by changing configurable values

Change the following configurable values to enhance P4 Server security.

For details about each configurable, see Configurables reference in P4 CLI Reference.

Before performing these steps, if you have not done so already, set a server ID. See Set the server ID.
  1. In P4 Admin, click the Configurables tab.

  2. For each configurable in the following list, double-click the configurable to open it. In the configurable dialog box, set the New value field with the value in the following list and click Set.

    Configurable name

    Set the New value to:

    Description
    dm.user.noautocreate 2 Prevents automatic user creation. Only a P4 administrator can create users.

    It is best practice to assign an initial password to a new user when you create them. that user an initial password. Make it a strong password.
    dm.user.setinitialpasswd 0

    Ensures that only users with super permissions who already have a password set can set the initial password for other users.

    dm.user.resetpassword 1 Forces new users to reset their password on initial login.
    dm.info.hide 1 Hides server version information from unauthorized users.
    dm.user.hideinvalid 1 Hides that an authentication failure is because of an incorrect username.
    run.users.authorize 1 Hides user details from unauthenticated users.

Additional security information

Keeping your P4 Server secure is essential. To learn more about security, see Secure the server in the P4 Server Administration Documentation.

What's next

By setting up a typemap, you can ensure that P4 Server handles files with specific extensions or files in specific folders in a specific way.

Go to Step 6: Configure typemap settings.