NetWorker: commands fail "Failed to validate security token" or "Security token has expired"

Summary: nsr commands fail while logged as root, or when running nsr commands from an Administrator command prompt.

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

nsr commands fail while logged as root, or when running nsr commands from an Administrator command prompt.
nsr commands after logging in with nsrlogin works fine.

NetWorker commands produce the following errors.

Cannot connect to resource database: Unable to set user privileges based on user token for <user> on <NetWorker server>: Failed to validate security token.
Unable to set user privileges based on user token for <user> on <NetWorker server>: Security token has expired.

Similar errors may be observed in the NetWorker server's daemon.raw log:

Cause

This is expected behavior.

A user issued a NetWorker authentication token using the  nsrlogin previously without running nsrlogout. The nsrlogin tokens expire every eight hours. If nsrlogout is not used to close the session, the token expires and stale tokens from the previous nsrlogin session are present in /nsr/tmp/sec/tokens on the NetWorker server.

Reauthenticating with nsrlogin may issue a new token; however, if nsrlogout is not used the same problem appears when the new token expires.

Resolution

Whenever using nsrlogin command to authenticate a command or shell prompt with NetWorker authentication, you must run nsrlogout when you have completed performing NetWorker tasks. 

nsrlogout clears the AUTHC token, thereby preventing stale tokens. 

The order of operations is:

  1. Authenticate a NetWorker user account: nsrlogin -u USERNAME
  2. Perform NetWorker commands from the command prompt or shell.
  3. Close the AUTHC session: nsrlogout
NOTE: When you are using an Administrator command-prompt/PowerShell or a root shell, it is not necessary to use nsrlogin. These elevated prompts are already OS privileged, and NetWorker commands operate using elevated OS privileges. nsrlogin can be used to authenticate an unelevated user prompt with NetWorker accounts. This grants the user access to perform NetWorker tasks when they are permitted to manage NetWorker, but do not have access to elevated OS prompts. The tasks permitted in NetWorker depend the NSR Usergroup that user is defined in.

Affected Products

NetWorker Family, NetWorker
Article Properties
Article Number: 000224499
Article Type: Solution
Last Modified: 08 رمضان 1447
Version:  2
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.