From 3f8e621609f920c1aa0e30392c26b4dcca03b14b Mon Sep 17 00:00:00 2001 From: Daniel <33197631+dadav@users.noreply.github.com> Date: Thu, 12 Oct 2023 22:37:02 +0200 Subject: [PATCH] systemd-creds: add page (#10936) * systemd-creds: add page * Update pages/linux/systemd-creds.md Co-authored-by: K.B.Dharun Krishna * Update pages/linux/systemd-creds.md Co-authored-by: K.B.Dharun Krishna * Update pages/linux/systemd-creds.md Co-authored-by: K.B.Dharun Krishna * Update pages/linux/systemd-creds.md Co-authored-by: K.B.Dharun Krishna * Update pages/linux/systemd-creds.md Co-authored-by: K.B.Dharun Krishna --------- Co-authored-by: K.B.Dharun Krishna --- pages/linux/systemd-creds.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/linux/systemd-creds.md diff --git a/pages/linux/systemd-creds.md b/pages/linux/systemd-creds.md new file mode 100644 index 000000000..16a326cf6 --- /dev/null +++ b/pages/linux/systemd-creds.md @@ -0,0 +1,24 @@ +# systemd-creds + +> List, show, encrypt and decrypt service credentials. +> More information: . + +- Encrypt a file and set a specific name: + +`systemd-creds encrypt --name={{name}} {{path/to/input_file}} {{path/to/output}}` + +- Decrypt the file again: + +`systemd-creds decrypt {{path/to/input_file}} {{path/to/output_file}}` + +- Encrypt text from `stdin`: + +`echo -n {{text}} | systemd-creds encrypt --name={{name}} - {{path/to/output}}` + +- Encrypt the text and append it to the service file (the credentials will be available in `$CREDENTIALS_DIRECTORY`): + +`echo -n {{text}} | systemd-creds encrypt --name={{name}} --pretty - - >> {{service}}` + +- Create a credential that is only valid until the given timestamp: + +`systemd-creds encrypt --not-after="{{timestamp}}" {{path/to/input_file}} {{path/to/output_file}}`