maprlogin Command Syntax

Argument or Option




The user's UNIX password



Indicates the presence of a Kerberos ticket


generateticket Generates a service ticket for another user or application. The user who runs the maprlogin command with this option must already have a user ticket and must have fc (full control) ACL authorization on the cluster. See acl set. N/A

Required ticket type for the generateticket command; must be service or crosscluster:

  • service is used to generate service tickets for regular cluster operations.
  • crosscluster is used to generate tickets for inter-cluster operations, such as remote mirroring. The crosscluster option only works with the mapr user.
No default; -type must be set in the maprlogin generateticket command.


Prints user ticket information



Simulates runtime behavior during authentication



Renews the ticket, given a duration that does not cause the ticket to exceed its maximum lifetime. The original -renewal value for the ticket determines its maximum lifetime.



Name of the cluster to log into

First cluster name in the /opt/mapr/conf/mapr-clusters.conf file


UNIX user name on the MapR cluster.

For crosscluster tickets, the user must be mapr.



A safe directory location where the ticket will be stored.

You must specify a location when generating service tickets. (This requirement ensures that other tickets are not overwritten.)


(default applies to non-service tickets only)


Length of time before the ticket expires, specified in one of the following formats:

-duration [Days:]Hours:Minutes

- duration Seconds

Password-generated tickets are bounded by the CLDB duration and renewal properties that are set for the cluster:

  • (default=1209600)
  • (default=2592000)

See config.

However, service tickets may have a very long lifetime; their duration is not bounded by these properties.

If -duration is not set in the maprlogin command, the CLDB duration property is set by default.

1209600 seconds (14 days)


Total lifetime of the ticket, specified in one of the following formats:

-renewal [Days:]Hours:Minutes

-renewal Seconds

If -renewal is not set in the maprlogin command, the CLDB renewal property is set by default (

For example, assume that the maprlogin command passes the following options for a service ticket:

-duration 30:0:0 -renewal 90:0:0

The ticket will expire after 30 days unless it is renewed. If a maprlogin renew command is submitted for the ticket before the initial 30 days pass, the ticket's lifetime may be extended up to a total maximum lifetime of 90 days. Tickets do not renew automatically; administrators must renew them with the maprlogin renew command, specifying a valid renewal period, and they must do this before the duration period ends. The renewal period must be less than or equal to the remaining amount of time allowed on the ticket.

Using the same example, if you renew a ticket on the 29th day of its life, you can renew it for up to 61 days. You can renew a ticket incrementally, for some number of days at a time, as long as you do not exceed the original renewal value.

2592000 seconds (30 days)

Displaying User Ticket Information

To display the contents of all user tickets, run maprlogin print. Sample output is shown below. Note that the uid (user id) has been converted to a 10-digit number.
$ maprlogin password
[Password for user 'juser' at cluster '': ] 
MapR credentials of user 'juser' for cluster '' are written to '/tmp/maprticket_1000'
$ maprlogin print
Opening keyfile /tmp/maprticket_1000
 user = juser, created = 'Sun Nov 24 18:59:43 PST 2013', expires = 'Sun 
Dec 08 18:59:43 PST 2013', RenewalTill = 'Tue Dec 24 18:59:43 PST 2013',
 uid = 1000, gids = 1000, 4, 24, 27, 30, 46, 109, 124 

Running an Authentication Test

authtest: This troubleshooting option simulates the behavior of the runtime during authentication, going through the authentication flow.

Options: [ -cluster ] Specifies the name of the cluster.

Ending a Session Before the Ticket Expires

end or logout: Destroys tickets and logs out.

Options: [ -cluster ] Specifies the name of the cluster. By default, deletes all tickets for all clusters.

Renewing a Ticket Before It Expires

renew: Renews an existing ticket for a specified time period.

Options: [ -cluster ] Specifies the name of the cluster. [ -duration ] Specifies the ticket duration.

The duration you specify must be valid for the ticket in question, given the original -renewal value for the ticket and the life of the ticket when the renew command is run:

  • You cannot renew a ticket that has already expired.
  • You can renew the same ticket multiple times.
  • The renewal period (or periods) cannot exceed the available time left for the ticket.

For example, assume that a ticket is created with a duration of 10 days and a renewal of 30 days:

maprlogin password -duration 10:0:0 -renewal 30:0:0
  • On the 11th day, the ticket expires and cannot be renewed at all.
  • On the 9th day, you can renew the ticket for any number of days up to a maximum of 21.
  • On the 23rd day, you can renew the ticket for any number of days up to a maximum of 7.

When a User Tries to Access a Cluster Without a Ticket

Any user who wants to access a secure cluster must have a MapR user ticket. If a user tries to log in without a ticket, an error message appears similar to these:
$ hadoop fs -ls
Bad connection to FS. command aborted. exception: failure to login: Unable to obtain MapR credentials

$ maprcli node list
ERROR (22) -  You do not have a ticket to communicate with Retry after obtaining a new ticket using maprlogin

Troubleshooting maprlogin Failures

While the root causes of most failure cases with maprlogin can be quickly diagnosed, the following cases can prove challenging:

  • When security is enabled for a cluster, the cluster's CLDB listens for connections on port 7443. If security for the cluster is disabled, the maprlogin utility is unable to reach the CLDB.
  • The utility's connection uses HTTPS, which requires the file conf/ssl_truststore to exist on the client. If the file is not present, a secure connection cannot be negotiated.

Detailed error logs for maprlogin connection attempts are kept at logs/maprlogin-<USERID>-nnnn.log.