Both sides previous revisionPrevious revisionNext revision | Previous revision |
sw:pwman3:intro [2017/09/13 06:04] – Frank Fegert | sw:pwman3:intro [2017/09/17 08:23] (current) – Frank Fegert |
---|
===== General Files and Directories ===== | ===== General Files and Directories ===== |
| |
^ File or Directory ^ Description ^ | ^ File or Directory ^ Description ^ |
| ''$HOME/.pwman3/'' | User-specific pwman3 directory. | | | ''$HOME/.pwman/'' | User-specific pwman3 directory. | |
| | ''$HOME/.pwman/pwman.db'' | The user's default SQLite password database if no other database or location is specified. | |
/* | |
| ''$HOME/.pwsafe/pwsafe.psafe3'' | The user's default password database if no other database or location is specified. | | |
*/ | |
| |
===== Configuration Files ===== | ===== Configuration Files ===== |
| |
^ File or Directory ^ Description ^ | ^ File or Directory ^ Description ^ |
| ''$HOME/.pwman3/config'' | The application's configuration file. | | | ''$HOME/.pwman/config'' | The application's configuration file. | |
| |
====== Getting Help ====== | ====== Getting Help ====== |
<cli> | <cli> |
user@host:~$ zless /usr/share/doc/pwman3/README.md.gz | user@host:~$ zless /usr/share/doc/pwman3/README.md.gz |
| </cli> |
| |
| Inline help: |
| |
| <cli> |
| user@host:~$ pwman3 |
| pwman> help |
| |
| Documented commands (type help <topic>): |
| ======================================== |
| EOF copy e export h list o passwd save |
| clear cp edit filter help n open print set |
| cls delete exit forget l new p rm tags |
| |
| Miscellaneous help topics: |
| ========================== |
| import |
| |
| Undocumented commands: |
| ====================== |
| ls |
</cli> | </cli> |
| |
====== Configuration ====== | ====== Configuration ====== |
| |
FIXME | The user-specific //pwman3// configuration file ''$HOME/.pwman/config'' has the following INI-style structure: |
| |
| <code> |
| [section-name] |
| option = value |
| option = value |
| ... |
| </code> |
| |
| The following table describes the configuration options and their possible values as well as the section names where those configuration options are valid in: |
| |
| <sortable 3phase> |
| ^ Section ^ Option ^ Value ^ Description ^ |
| | Readline | history | String | Path to the file containing history of the commands typed. | |
| | Global | save | True / False | Whether the configuring file should be saved. | |
| | Global | colors | yes / no | If set to no, no colors used in output. This is useful for breil terminals. | |
| | Global | cp_timeout | Integer | Number of seconds before the clipboard is erased. | |
| | Global | cls_timeout | Integer | Number of seconds before the screen is clean after a print. | |
| | Global | umask | String | The umask in which database and configuration files are written. | |
| | Global | xsel | String | Path to the xsel binary (Linux and BSD only). | |
| | Global | lock_timeout | Integer | Set the time period (in seconds) after which the database is locked. | |
| | Database | dburi | Database URI according to [[https://tools.ietf.org/html/rfc3986|RFC3986]] | SQLite, Postgreql, MySQL and MongoDB are currently supported. See below for examples. | |
| | Updater | supress_version_check | yes / no | Check for newer versions of //pwman3.// | |
| | Updater | client_info | string | SHA256 digest of host name and username. Used for identifying the client. | |
| </sortable> |
| |
| Database URI examples: |
| |
| * SQLite: ''<nowiki>sqlite:///path/to/your/db</nowiki>'' |
| * Postgreql: ''<nowiki>postgresql://<user>:<pass>@<host[:port]>/<database></nowiki>'' |
| * MySQL: ''<nowiki>mysql://<user>:<pass>@<host[:port]>/<database></nowiki>'' |
| * MongoDB: ''<nowiki>mongodb://<user>:<pass>@<host[:port]>/<database></nowiki>'' |
| |
====== Usage ====== | ====== Usage ====== |
| |
FIXME | ===== Initial Start ===== |
| |
| Upon inital start, //pwman3// generates a new password database: |
| |
| <cli> |
| user@host:~$ pwman3 |
| Please enter your new password: |
| Please enter your new password again: |
| Pwman3 0.5.1d (c) visit: http://pwman3.github.io/pwman3/ |
| pwman> |
| </cli> |
| |
| The new password database is stored in the user-specific //pwman3// directory, e.g.: |
| |
| <cli> |
| user@host:~$ ls -l ~/.pwman/ |
| total 12 |
| -rw------- 1 user user 9216 Sep 14 07:05 pwman.db |
| </cli> |
| |
| ===== Commands ===== |
| |
| The following -- partially synonymous -- commands are available within //pwman3//: |
| |
| ^ Command ^ Description ^ |
| | ''EOF'', ''exit'' | Exit the application. | |
| | ''clear'' | Clears the filter criteria. | |
| | ''cls'' | Clear the screen. | |
| | ''copy'', ''cp'' | Copy password to X clipboard (//xsel// is required). | |
| | ''delete'', ''rm'' | Deletes nodes. Multiple ids and nodes can be specifie , separated by a space. A range of ids can be specified in the format n-N. | |
| | ''e'', ''edit'' | Edit a nodes. | |
| | ''export [{'filename': '<file>', 'delimiter':'<char>'}]'' | All nodes under the current filter are exported. | |
| | ''h [topic]'', ''help [topic]'' | Print a help message for a command. | |
| | ''filter <tag>'' | Filter nodes on a given tag. One or more tags are allowed. Displays current list of tags if called without arguments. | |
| | ''forget'' | Forget the database password for the current session. | |
| | ''l <tag>'', ''list <tag>'' | List nodes that match current or specified filter. | |
| | ''n'', ''new'' | Creates a new node. | |
| | ''o <ID>'', ''open <ID>'' | Launch default browser with ''xdg-open url'', for the given node id. Ihe URL must contain <nowiki>http://</nowiki> or <nowiki>https://</nowiki>. | |
| | ''passwd'' | Change the password on the database. | |
| | ''p <ID|tag>'', ''print <ID|tag>'' | Display a node. ultiple ids and nodes can be specified, separated by a space. A range of ids can be specified in the format n-N. | |
| | ''save [filename]'' | Save the current configuration. | |
| | ''set [option] [value]'' | Set a configuration option. Display current value if no value is given. Display the complete configuration of option and value are omitted. | |
| | ''tags'' | Display all tags in used in the database. | |
| |
| ===== Common Tasks ===== |
| |
| Create a new password entry -- node -- in the database: |
| |
| <cli prompt='>'> |
| pwman> new |
| Username: username |
| Password (Blank to generate): |
| [Repeat] Password (Blank to generate): |
| Url: http://www.bityard.org |
| Notes: 1st Test |
| Please enter your password: |
| Tags: Web |
| </cli> |
| |
| List all nodes: |
| |
| <cli prompt='>'> |
| pwman> filter |
| Current tags: |
| None |
| |
| pwman> ls |
| 1. username@http://www.bityard.org Web |
| </cli> |
| |
| Print a node by its ID: |
| |
| <cli prompt='>'> |
| pwman> print 1 |
| Node 1. |
| Username: username |
| Password: asdasdasd |
| Url: http://www.bityard.org |
| Notes: 1st Test |
| Tags: |
| Web |
| </cli> |
| |
| Filter nodes by a given tag: |
| |
| <cli prompt='>'> |
| pwman> ls |
| 1. username@http://www.bityard.org Web |
| 2. root@ SSH |
| |
| pwman> filter Web |
| Current tags: |
| Web |
| |
| pwman> ls |
| 1. username@http://www.bityard.org Web |
| </cli> |
| |
| Delete a node |
| |
| <cli prompt='>'> |
| pwman> ls |
| 1. username@http://www.bityard.org Web |
| 2. root@ SSH |
| |
| pwman> delete 1 |
| Are you sure you want to delete 'username@http://www.bityard.org' ([y/N])?y |
| username@http://www.bityard.org deleted |
| |
| pwman> ls |
| 2. root@ SSH |
| </cli> |
| |
===== Status Check ===== | ===== Status Check ===== |