# Verwendung von % im SMTP-Passwort für discourse-setup

**URL:** https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434
**Category:** Bug
**Created:** [13. Januar 2019 um 18:22 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434 "2019-01-13T18:22:03Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![LotusJeff](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lotusjeff/32/477888_2.png) [@LotusJeff](https://meta.discourse.org/u/LotusJeff)
#### Post date: [13. Januar 2019 um 18:22 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/1 "2019-01-13T18:22:03Z")

</div>

I used a % as a special character in my SMTP password. This caused a control character to be created in the app.yml file that caused the following errors

```
(): control characters are not allowed at line 1 column 1 -e LANG=en_US.UTF-8 
YAML syntax error. Please check your containers/*.yml config files. 

```

I tried rerunning discourse-setup and it kept failing.

Eventually the data field in the app.yml file looked like this:

`DISCOURSE_SMTP_PASSWORD: "74 DISCOURSE_SMTP_PASSWORD: "74% DISCOURSE_SMTP_PASSWORD: 74%DISCOURSE_SMTP_PASSWORD: 7e[3~e[3~e[3~e[3~e[3~74%DISCOURSE_SMTP_PASSWORD: pa$$word......"`

To resolve I had to manually edit the app.yml file to remove all the bad data and had to remove the % sign from my password. The setup than ran smoothly and allowed the setup of a new discourse install.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [14. Januar 2019 um 11:15 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/2 "2019-01-14T11:15:48Z")

</div>

Sigh. I thought that I’d fixed it such that special characters didn’t break the smtp password.

Are you saying that even if you edited the file by hand it worked or that you had to create a new password without a percent sign?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [14. Januar 2019 um 17:32 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/3 "2019-01-14T17:32:02Z")

</div>

I just entered an smtp password with a `%` and `./discourse-setup` properly created:

```
   DISCOURSE_SMTP_PASSWORD: "hitsd$%password"

```

It looks like `./launcher` is doing fine as well.

Were there other characters in the password? If you’ve changed it, can you send me the exact password so that I can see what’s up?

Thanks.

---

<div class="post-metadata">

### Author: ![LotusJeff](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lotusjeff/32/477888_2.png) [@LotusJeff](https://meta.discourse.org/u/LotusJeff)
#### Post date: [2. März 2019 um 16:33 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/4 "2019-03-02T16:33:50Z")

</div>

I use a password generator for all server related components. It uses a wide variety of special characters. Below is the password I used to setup the service that caused the problems. I have changed the actual password being used.

$YkFrf='De\x"\*|VWj;3&%!

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [2. März 2019 um 17:46 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/5 "2019-03-02T17:46:11Z")

</div>

Use of " in passwords that are stored in config files is usually a bad idea. The password is wrapped in quotes within your app.yml.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [3. März 2019 um 00:23 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/6 "2019-03-03T00:23:44Z")

</div>

Thanks, Stephen. I didn’t notice the quotes on first glance.

Yeah, if you really want to use `"` or `'` in a password, you’ll have to escape it. If you replace the quotes with something else does it work? Or, you might be able to escape them with a `\`, but I’m not really sure. You’ll probably need to escape them and edit `app.yml` by hand.

---

<div class="post-metadata">

### Author: ![dlukefinch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dlukefinch/32/131650_2.png) [@dlukefinch](https://meta.discourse.org/u/dlukefinch)
#### Post date: [3. Juni 2019 um 21:38 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/7 "2019-06-03T21:38:03Z")

</div>

I have the same issue except that my password does not have any special characters. I just accidentally included some-don’t ask!

My app.yml file looks like this…

 ![42](https://global.discourse-cdn.com/meta/original/3X/b/c/bc2878383fcd94f64190e5ff3f1c53d38fdc912b.png)

Error I am getting:

```plaintext
(<unknown>): control characters are not allowed at line 1 column 1 -e LANG=en_US.UTF-8
YAML syntax error. Please check your containers/*.yml config files.

```

Any ideas?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [3. Juni 2019 um 22:02 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/8 "2019-06-03T22:02:09Z")

</div>

Try

```plaintext
sudo apt install yamllint
yamllint -d "{extends: relaxed, rules: {line-length: {max: 9999999}}}" containers/app.yml

```

and share the output here

---

<div class="post-metadata">

### Author: ![dlukefinch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dlukefinch/32/131650_2.png) [@dlukefinch](https://meta.discourse.org/u/dlukefinch)
#### Post date: [3. Juni 2019 um 22:04 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/9 "2019-06-03T22:04:40Z")

</div>

Here ya go 🙂

```plaintext
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  grub-pc-bin
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  python3-pathspec
The following NEW packages will be installed:
  python3-pathspec yamllint
0 upgraded, 2 newly installed, 0 to remove and 21 not upgraded.
Need to get 51.8 kB of archives.
After this operation, 255 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.digitalocean.com/ubuntu bionic/universe amd64 python3-pathspec all 0.5.5-1 [22.1 kB]
Get:2 http://mirrors.digitalocean.com/ubuntu bionic/universe amd64 yamllint all 1.10.0-1 [29.6 kB]
Fetched 51.8 kB in 0s (584 kB/s)
Selecting previously unselected package python3-pathspec.
(Reading database ... 60350 files and directories currently installed.)
Preparing to unpack .../python3-pathspec_0.5.5-1_all.deb ...
Unpacking python3-pathspec (0.5.5-1) ..........................................................] 
Selecting previously unselected package yamllint...............................................] 
Preparing to unpack .../yamllint_1.10.0-1_all.deb ...
Unpacking yamllint (1.10.0-1) ...#############.................................................] 
Setting up python3-pathspec (0.5.5-1) ...###################...................................] 
Setting up yamllint (1.10.0-1) ...########################################.....................] 
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...###################################.......]

```

---

<div class="post-metadata">

### Author: ![schleifer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schleifer/32/86416_2.png) [@schleifer](https://meta.discourse.org/u/schleifer)
#### Post date: [4. Juni 2019 um 05:06 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/10 "2019-06-04T05:06:06Z")

</div>

¿Did you run the `yamllint` part?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4. Juni 2019 um 05:19 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/11 "2019-06-04T05:19:39Z")

</div>

Did you edit the file by hand or did you use discourse-setup?

---

<div class="post-metadata">

### Author: ![dlukefinch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dlukefinch/32/131650_2.png) [@dlukefinch](https://meta.discourse.org/u/dlukefinch)
#### Post date: [4. Juni 2019 um 11:52 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/12 "2019-06-04T11:52:38Z")

</div>

I’m sorry @schleifer I’m not sure what you mean? 🤔

@pfaffman I used the discourse-setup.

---

<div class="post-metadata">

### Author: ![dlukefinch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dlukefinch/32/131650_2.png) [@dlukefinch](https://meta.discourse.org/u/dlukefinch)
#### Post date: [4. Juni 2019 um 11:58 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/13 "2019-06-04T11:58:31Z")

</div>

Ok, it is sorted now. Started afresh this morning and entered everything REALLY carefully. Process running and expected now. Must have entered something really minute.

Thanks for your responses.

---

<div class="post-metadata">

### Author: ![schleifer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schleifer/32/86416_2.png) [@schleifer](https://meta.discourse.org/u/schleifer)
#### Post date: [4. Juni 2019 um 15:10 UTC](https://meta.discourse.org/t/use-of-in-smtp-password-for-discourse-setup/106434/14 "2019-06-04T15:10:12Z")

</div>


