Project

General

Profile

Restoring a User Account From the Command-Line

The command-line interface (CLI) provides a number of mechanisms for managing NSIA if you cannot access the web-interface. To access the CLI, stop NSIA and run the following command from a shell within the bin directory (e.g. C:\Program Files\ThreatFactor NSIA\bin):

java -jar nsia.jar

The interactive CLI will appear. Type help to see all commands. To restore access, use one of the following CLI commands:

  • User.SetPassword
  • User.Unlock
  • User.Enable
  • User.Add

For example, if you need to change a user's password do the following steps:

First, start NSIA from the command-line

ThreatFactor NSIA 1.0.0 (http://ThreatFactor.com)
Web server running on: http://127.0.0.1:8080

Interactive console, type help for list of commands
>

Next, run "User.List" to list the users:

> User.List

Login Name     Full Name     User ID     Status     Is Unrestricted     
------------------------------------------------------------------------
Luke           Luke          1           Active     yes                 
John           John          2           Active     yes                 
Matthew        Matthew       3           Active     no                  
Mark           Mark          4           Active     no                  

We are going to use the "User.setPassword" function to reset the password. Run the command with no arguments to see the necessary arguments:

> User.setPassword

Error: too few arguments provided, syntax of the command is "User.SetPassword <username>" 

Now run the command to set the password (you don't have to provide the password if you want it to prompt for it):

> User.setPassword Mark 

Enter the user's password: 
Enter the user's password again: 
Password successfully changed
> 

Now shutdown NSIA and restart it using the Windows Service, Unix daemon script or however you usually run it:

> exit

System is shutting down...Done