From 938116efd74d699d30a52a40be874f04454fef88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolaj=20Gr=C3=A6sholt?= Date: Sun, 17 Jun 2018 15:30:29 +0200 Subject: [PATCH] Update scratch.md (#9075) `base64` generates 76-character chunks of text, delimited by a space character. the `=+/` characters are removed, so on the (uniformly random) offchance that 44 characters are removed, the last `dd` will read a whitespace, and the token will include a whitespace, which "usually" isn't defined as an "alphanumeric character." Removing the space character as well, would mean that 142 of the characters would have to be a `=+/[:space:]`, before the token becomes shorter. --- content/en/docs/setup/scratch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/setup/scratch.md b/content/en/docs/setup/scratch.md index 67b1785676..46d0d451c9 100644 --- a/content/en/docs/setup/scratch.md +++ b/content/en/docs/setup/scratch.md @@ -258,7 +258,7 @@ The admin user (and any users) need: - a token or a password to identify them. - tokens are just long alphanumeric strings, 32 chars for example. See - - `TOKEN=$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64 | tr -d "=+/" | dd bs=32 count=1 2>/dev/null)` + - `TOKEN=$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64 | tr -d "=+/[:space:]" | dd bs=32 count=1 2>/dev/null)` Your tokens and passwords need to be stored in a file for the apiserver to read. This guide uses `/var/lib/kube-apiserver/known_tokens.csv`.