wiki/HowtoKeePassX.md

145 lines
5.5 KiB
Markdown
Raw Normal View History

2017-10-03 12:04:00 +02:00
---
categories: Desktop
title: Howto KeepassX
...
2016-09-26 13:50:18 +02:00
2017-10-03 12:04:00 +02:00
* Site web <https://www.keepassx.org/>
2016-09-26 13:50:18 +02:00
2017-10-03 12:24:56 +02:00
KeePassX est un logiciel de gestion des mots de passe. C'est un fork du logiciel [KeePass](http://keepass.info/) avec lequel son format de stockage (.kdb/.kdbx) est compatible.
2017-10-03 12:04:00 +02:00
KeePassX 0.4 utilise le format .kdb (compatible avec [KeePass](http://keepass.info/) 1)
2016-09-26 13:50:18 +02:00
KeePassX 2 utilise le format .kdbx (compatible avec [KeePass](http://keepass.info/) 2).
2017-10-03 12:04:00 +02:00
**Nous utilisons pour l'instant KeePassX 0.4 et son format .kdb**
2016-09-26 13:50:18 +02:00
## Installation
~~~
# apt install keepassx kpcli
~~~
2017-10-03 12:24:56 +02:00
Sous Debian *Jessie* c'est KeepassX 0.4.3 qui est distribué. Incompatible avec le format kdbx. Pour cela il faut se tourner vers la version présente dans *jessie-backports*.
2017-10-03 15:05:21 +02:00
Sous Debian *Stretch* c'est KeepassX 2.0.3 qui est distribué. On peut rajouter à la commande *apt* les packets `libcapture-tiny-perl` et `libclipboard-perl` (disponible uniquement sous *Strecth*) pour avoir accès au commandes xu, xp, xw et xx de kpcli, permetant de placer le login ou mot depasse directement dans le presse papuier
2016-09-26 13:50:18 +02:00
2017-10-03 12:04:00 +02:00
## Utilisation de base (Client graphique)
Vous pouvez créer un fichier .kdb protégé par mot de passer et/ou clé pour stocker vos mots de passe : Fichier> Nouvelle base de données> Mot de passe: PASSWORD > OK > Enregistrer la base de données
2016-09-26 13:50:18 +02:00
Vous pourrez ainsi ultérieurement l'utiliser via :
~~~
2016-09-26 13:50:18 +02:00
$ keepass db.kdb
~~~
## kpcli
2017-10-03 12:33:02 +02:00
kpcli est un utilitaire permettant la manipulation de fichier kdb depuis la console. Il couvre toute les fonctions principales utilisables dans le logiciel graphique. Il se comporte comme un mini shell, représentant les groupes sous forme d'arboressance de dossier permettant d'interagir facilement avec le container de mots de passe.
2017-10-03 12:04:00 +02:00
### Créer une nouvelle base
Il suffit de lancer kpcli sans arguments, puis de sauvegarder :
~~~
$ kpcli
kpcli:/> help saveas
saveas: Save to a specific filename (saveas <file.kdb> [<file.key>])
kpcli:/> saveas foo.kdb
Please provide the master password: *************************
Retype to verify: *************************
~~~
### Utilisation courante
2017-10-03 12:24:56 +02:00
kpcli a quelques options au démarrage. Les plus utiles étant :
* `--kdb FICHIER.kdb` - Spécifie le fichier kdb à ouvrir.
* `--key FICHIER` - Spécifie le fichier clé à utiliser pour déverrouiller la base
* `--readonly` - Ouverture de la base de donnée en lecture seule
2016-09-26 13:50:18 +02:00
~~~
$ kpcli -kdb db.kdb
Please provide the master password: *************************
KeePass CLI (kpcli) v2.7 is ready for operation.
Type 'help' for a description of available commands.
Type 'help <command>' for details on individual commands.
2017-10-03 12:33:02 +02:00
kpcli:/> help
attach -- Manage attachments: attach <path to entry|entry number>
cd -- Change directory (path to a group)
cl -- Change directory and list entries (cd+ls)
clone -- Clone an entry: clone <path to entry> <path to new entry>
close -- Close the currently opened database
cls -- Clear screen ("clear" command also works)
copy -- Copy an entry: copy <path to entry> <path to new entry>
edit -- Edit an entry: edit <path to entry|entry number>
export -- Export entries to a new KeePass DB (export <file.kdb> [<file.key>])
find -- Finds entries by Title
help -- Print helpful information
history -- Prints the command history
icons -- Change group or entry icons in the database
import -- Import another KeePass DB (import <file.kdb> <path> [<file.key>])
ls -- Lists items in the pwd or a specified path ("dir" also works)
mkdir -- Create a new group (mkdir <group_name>)
mv -- Move an item: mv <path to group|entry> <path to group>
new -- Create a new entry: new <optional path&|title>
open -- Open a KeePass database file (open <file.kdb> [<file.key>])
pwck -- Check password quality: pwck <entry|group>
pwd -- Print the current working directory
quit -- Quit this program (EOF and exit also work)
rename -- Rename a group: rename <path to group>
rm -- Remove an entry: rm <path to entry|entry number>
rmdir -- Delete a group (rmdir <group_name>)
save -- Save the database to disk
saveas -- Save to a specific filename (saveas <file.kdb> [<file.key>])
show -- Show an entry: show [-f] [-a] <entry path|entry number>
stats -- Prints statistics about the open KeePass file
ver -- Print the version of this program
vers -- Same as "ver -v"
xp -- Copy password to clipboard: xp <entry path|number>
xu -- Copy username to clipboard: xu <entry path|number>
xw -- Copy URL (www) to clipboard: xw <entry path|number>
xx -- Clear the clipboard: xx
Type "help <command>" for more detailed help on a command.
2016-09-26 13:50:18 +02:00
kpcli:/> ls
=== Groups ===
eMail/
Internet/
kpcli:/> cd Internet/
kpcli:/Internet> ls
=== Entries ===
2017-10-03 12:33:02 +02:00
0. example.com secure.example.com
1. example.net intra.example.net
2. example.org magic.example.org
kpcli:/Internet> show 2
2016-09-26 13:50:18 +02:00
Path: /Internet
2017-10-03 12:33:02 +02:00
Title: example.org
Uname: baz
Pass:
URL: magic.example.net
Notes: Tarpin secure thing
2016-09-26 13:50:18 +02:00
~~~
Note : le champ "Pass" est invisible mais l'on peut le copier/coller avec la souris.
### Ajouter une entrée
~~~
$ kpcli:/Internet> new
Adding new entry to "/Internet"
Title: example
Username: root
Password: ("g" or "w" to auto-generate, "i" for interactive)
Retype to verify:
URL:
Notes/Comments (""):
Database was modified. Do you want to save it now? [y/N]:
Saved to /home/evolix/partage/private/evolix.shared.kdb
2017-10-03 12:33:02 +02:00
~~~
### Modifier une entrée