Log in to the Perforce service by obtaining a ticket.
p4 [g-opts] login [-a -p] [-h host] [user]
p4 [g-opts] login [-s]
p4 [g-opts] login [-r remote spec]
The p4 login
command authenticates a user and
creates a ticket that represents a session with
Helix Server. Once
authenticated, a user can access the shared versioning service until
either the ticket expires or until the user issues the p4 logout
command.
By default, tickets are valid for 12 hours. This default value is
defined on a per-group basis in the p4
group
form.
To obtain a ticket valid for all IP addresses (for instance, to use
Helix Server
simultaneously on more than one workstation), use p4 login
-a
. Users with tickets that are valid for all IP addresses
still consume only one
Helix Server
license.
Login attempts, whether successful or not, are logged to a structured log file. If the login fails, the reason for failure is included in the log. In the case of authentication triggers or LDAP authentication, the parts of the error message that contain user data are sanitized as needed.
If you use LDAP authentication, you can set the getattrs
option in the ldap spec options
field to specify whether the
Fullname
and Email
fields for users created by
p4 login
are populated from the directory.
|
Obtain a ticket that is valid for all IP addresses. |
|
Request a ticket that is valid for the specified host IP address. |
|
Display the ticket, rather than storing it in the local ticket file. |
|
Display the status of the current ticket, if one exists. |
|
Specify the remote server to which the login should be
forwarded. If the remote spec passed in contains a
|
|
See Global Options. |
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
N/A |
N/A |
|
unlimited
in the p4
group
form.dm.user.loginattempts
configurable.p4 login
while
already logged in. Your ticket’s lifespan is extended by 1/3 of its
initial timeout setting, subject to a maximum of your ticket’s initial
timeout setting.p4 -u username
login
form of the command and correctly supply the
other user’s password.P4TICKETS
environment
variable. If this variable is not set, tickets are stored in
%USERPROFILE%\p4tickets.txt
on Windows, and in
$HOME/.p4tickets
on other operating systems.-h
option causes the service to issue a ticket that
is valid on the specified host IP address. This option is typically
used with -p
to display a ticket that can subsequently be
used on another machine.
|
Prompt the user for a password. If the password is entered correctly, issue a ticket valid on the user’s machine. |
|
Attempt to log in as user |
To end a login session |
|
To display tickets |