Login process for the user
Users are authenticated in one of two ways:
-
The user logs in explicitly using the
p4 login
command. (For more information, see p4 login in Helix Core Command-Line (P4) Reference.) -
The user enters a
p4
command that requires that the user be authenticated. If the user is not already authenticated, the command prompts the user to log in. If the login attempt is successful, the original command continues.
To log in to
the Helix Core Server explicitly, the user
obtains a ticket from the server by using the p4
login
command:
$ p4 login
The user is prompted for a password, and a ticket is created for the
user in the file specified by P4TICKETS
. The user can extend
the ticket’s lifespan by calling p4 login
while
already logged in. This extends the ticket’s lifespan by 1/3 of its
initial timeout setting, subject to a maximum of the user’s initial
timeout setting.
By default, after 3
consecutive failed login attempts, the server
imposes a delay of up to 10
seconds on the user’s ability to run p4
login
. To alter this
behavior, set dm.user.loginattempts
to a different number of
consecutive failed login attempts.
By default,
the server issues
a ticket for the user that is valid solely for the user’s IP address. If the user has a
shared home directory that is used on more than one workstation, the user can
log in to
the server
from those workstations by using p4 login -a
to create a
ticket in the home directory that is valid from all IP addresses.
Tickets can be used by multiple clients on the same machine if they use the same user and port.
The auth.csv
log is used to log the results of
p4 login
attempts. (See auth.csv
in Enable and configure structured logging.)
If the login failed, the reason is included in the log. Additional information provided by the authentication method is included in the log entries.