The login command establishes your AccuRev user identity. You must specify the name of a registered AccuRev user, either on the command line, or when the
login command prompts you. Similarly, you can enter a password (case-sensitive) on the command line or when prompted. To indicate “no password” on the command line, enter a null string — for example, with two consecutive double-quote characters.
You won’t be able to execute most AccuRev CLI commands unless you are logged in. The exceptions are help,
login,
info, and
secinfo. In addition, exactly one
mkuser command is allowed in a new AccuRev installation, to prevent a chicken-and-egg authentication problem.
By default, a successful login initiates a session that lasts four hours. When the session expires, you’ll have to log in again. The
-n option creates a non-expiring session. (For security reasons, we suggest using the option sparingly.)
A successful login command creates an encrypted file that records your AccuRev username and password, along with the IP address of your client machine. Most AccuRev client commands can be executed only by an authorized user. Such commands send the information in your session file to the AccuRev Server process, so that you don't need to repeatedly “remind” the AccuRev Server who (and where) you are.
The name of the session file includes the hostname and port number of the AccuRev Server. If you login to different AccuRev Server processes, you'll have multiple session files, one for each Server. Example:
These session files indicate that your are logged in to an AccuRev Server on host venus, listening on port
5050, and are also logged into two different AccuRev Server processes on host
mars.
What if you want to be testuser john in one command shell, but testuser
mary in another — both using the same AccuRev Server? You can't have two session files with the same name (for example,
session_VENUS_5050) in your
.accurev subdirectory. But you can have two or more session files with the same name in different
.accurev subdirectories.
The login command uses the value of environment variable
ACCUREV_HOME as the pathname of the parent of the
.accurev subdirectory (and will create this subdirectory, if necessary). So do the commands that authenticate you by checking for the existence of a session file.