[ ← Overview ] [ Table Of Contents ↑ ] [ Web Interface → ]
Sunil Samuel
web_github@sunilsamuel.com
http://www.sunilsamuel.com
The application can be started by providing several command line parameters to it, which will help the application find the database.
There are two .jar files created as follows:
password-safe-webapp-<version>-shaded.jar
password-safe-webapp-<version>.jar
The -shaded
file contains all of the dependencies within that one jar, known as the uber-jar. if you are missing any libraries locally, then this is the version you should use. The non-shaded file should be used when you have a local installation of all the jars. Try with the non-shaded, and if you get errors then go with the -shaded.
NOTE: All of the command line parameters remain exactly the same.
If you are running the application for the first time, then run the application using the interactive mode. In fact, if you need to stop and restart the application, or even move the database to another machine and start it from there, you can still use the interactive mode. So, you can use the interactive mode every time you start the application.
java -jar password-safe-webapp-<version>.jar --interactive
or
java -jar password-safe-webapp-<version>.jar -i
This will start a wizard-like interactive mode that will ask you three questions. Once you answer these questions, the application will have enough information to start.
> java -jar target/password-safe-webapp-1.0.0-RELEASE.jar -i OK. You asked for interactive, so I will ask you some questions that will help me start properly. Enter the database directory. This is the path (relative or fullpath) to where the database would be saved. If this is the first time you are running this application, then give me a directory path and I will create the database directory. This will allow you to take this directory anywhere you go and use it on other machines. If this is not the first time you are running this application, or you want to use an existing database, then please provide the directory to the existing database. Database Directory:./my-password-safe Enter the port number. This is the port where the web application will run. The default port is 8080 and may be the right port to use since it does not require administrative permission. Enter Port:8080 Enter the password for the database. If this is the first time you are running this application, then enter a strong password for the database. Please remember this password since it will be needed if you choose to migrate this database elsewhere or restart the application. If you do not remember this password, then you will not be able to open this database and all your information will be lost!!!! Note, that this password is different from the password you will use to log onto the web-based application. Database Password: Re-enter Database Password: Server starting (try these URLs): http://192.168.0.103:8080 http://localhost:8080
If you prefer to run it in a non-interactive mode, then there are several command line parameters that will essentially accomplish the same as the interactive. This is useful if you want to create a script that runs the application non-interactively.
The entire list of command line parameters can be displayed by a -h parameter or by just running the jar without any parameters, as follows:
> java -jar password-safe-webapp-<version>.jar If you are running for the first time. Then run as interactive first. java -jar target/password-safe-webapp-<version>.jar -i java -jar target/password-safe-webapp-<version>.jar --interactive But then, you can always run as interactive since it's easier. DbDir must be provided. usage: password-safe -b,--dbDir <arg> Location of the database -d,--debug Start the application in debug mode -e,--debugPort Start the debug mode using this port (requires debug) -h,--help Show this help message -i,--interactive Start application in interactive mode -p,--port Start the application on this port (default 8080) -w,--dbPasswd Password for the database
The application can be run using --dbPasswd (-w)
to provide the password as a command line value. if this parameter is not used, then the application will ask for the password, the following example shows.
> java -jar target/password-safe-webapp-<version>.jar --dbDir ~/databases/newdb Please enter a password for database:<password> Server starting (try these URLs): http://192.168.0.103:8080 http://PearITup.local:8080 http://localhost:8080
The database that is created to host all of the information is encrypted and secured with a password. This password is required to open the database and if you lose this password, you will not be able to open the database. The password that you provide with the --dbPasswd (-w)
command line parameter is the password to the database.
The application also uses a role-based authentication system. Once you start the application, the database is created with a default username and password. Use this information to log onto the application and change the password, create additional users, and assign different roles to users.
Use the default username and password to log onto the application.
Username: admin@passwordsafeweb.com
Password: mypassword
[ ← Overview ] [ Table Of Contents ↑ ] [ Web Interface → ]