log in to an AccuRev Server


accurev login [ -n ] [ <user-name> [ <password> ] ]


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.)

The Session File

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.

If you're already logged in, and you successfully log in — as the same user or a different user — the existing session file is overwritten.

Session Expiration

Session files are automatically deleted by the AccuRev Server after an administrator-configurable interval (default: 240 minutes)

Multiple Session Files for Different Servers

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.

If you intend to maintain connections to two or more AccuRev Server processes, you’ll probably want to use the -H option in your accurev commands. See Working with Multiple Repositories.

Multiple Session Files for the Same Server

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.



Create a login session that does not expire. Logins created with this option will persist, even through a restart of the AccuRev Server.


Log in, letting the command prompt for both your username and password. For security, your keystrokes are echoed as “*” characters.

   > accurev login
Username: john
Password: ****************

Log in, specifying your username, but letting the command prompt for the password:

   > accurev login john
Password: ****************

Log in, specifying your username and password on the command line:

   > accurev login john Every1CanSeeThis

Log in, specifying your username and indicating that you don’t have a password:

   > accurev login john ""

See Also

authmethod, info, logout, mkuser, secinfo

User Authentication in the AccuRev Admin Guide