Skip to content

Commit 1caaa9f

Browse files
authored
Update elasticsearch-keystore.md
Customer needs document update for handling special characters and how we can use the echo command to enter the password.
1 parent 987e9f7 commit 1caaa9f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/reference/elasticsearch/command-line-tools/elasticsearch-keystore.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,20 @@ To pass the settings values through standard input (stdin), use the `--stdin` fl
150150
```sh
151151
cat /file/containing/setting/value | bin/elasticsearch-keystore add --stdin the.setting.name.to.set
152152
```
153+
Alternatively you can use the echo command to input the password into the keystore. For example if the password is `your\!password` :
154+
155+
```sh
156+
echo -n 'your\!password' | bin/elasticsearch-keystore add the.setting.name.to.set
157+
```
153158

154159
Values for multiple settings must be separated by carriage returns or newlines.
155160

161+
### Common Issues with Special Characters [special-chracter-issues]
162+
Exclamation Mark (`\!`): When using the shell, the combination `\!` is stored as just `!`. This can lead to authentication failures if the password is not stored as intended.
163+
164+
Quotes: If quotes are used around the password, they are stored as part of the password. This can cause the password to be incorrect when retrieved from the keystore.
165+
166+
Backslash (`\`): The backslash character needs to be escaped properly. If not escaped, it may be omitted or misinterpreted, leading to incorrect password storage.
156167

157168
### Add files to the keystore [add-file-to-keystore]
158169

0 commit comments

Comments
 (0)