Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add explanation #7626

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion modules/reference/pages/command/securityUtility-encode.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ The `securityUtility encode` command supports plain text obfuscation for Open Li
This command obfuscates text that you provide, such as a password, based on the type that is specified.
If no text is provided, the command enters interactive mode.
Interactive mode prompts you to enter and confirm your text input, rather than provide text on the same line as the command.
Text with spaces must be put in quotation marks.
Enclose any text with spaces in quotation marks.
If your password includes special characters, you must escape each special character to help ensure that the password is properly encoded. For more information, see <<pw,Check passwords for special characters>>
Special characters and escape characters might vary according to your operating system.
For example, on Unix systems, `pa$$W0rd` must be provided as `pa\$\$W0rd`.


For more information about limits to password encryption, see xref:ROOT:password-encryption.adoc[Password encryption limitations].

== Usage examples
Expand Down Expand Up @@ -111,3 +116,27 @@ The following exit codes are available for the `securityUtility encode` command:
|5
|This code indicates that the file already exists.
|===


[#pw]
== Check passwords for special characters

If your password includes special characters, you must escape each special character to help ensure that the password is properly encoded.
Special characters and escape characters might vary according to your operating system.
For example, on Unix systems, `pa$$W0rd` must be provided as `pa\$\$W0rd`.

To check whether your password includes any characters that your operating system considers to be special characters, you can run the `echo` command.

On the command line, type `echo` followed by the password and review the output to determine whether it differs from your specified password. If any characters are changed, you must escape the characters. The following example is for Ubuntu.

----
$ echo pa$$word
pa683word // OK until "pa"
$ echo pa\$$word // Added escape after "pa"
pa$ // OK until "pa$"
$ echo pa\$\$word // Added escape after "pa$"
pa$$word
// Escaping each special character individually provides the correct password to encode

$ securityUtility encode pa\$\$word
----