Elastic Enterprise Search installation problems - Configuration of yml files

I am trying to follow the instructions on https://www.elastic.co/de/downloads/enterprise-search. Unfortunately I have problems, when configuring the yml files.

First of all, it says:

Locate config/elasticsearch.yml and add the following configuration:
xpack.security.enabled: true

When I check the corresponding yml file, everything is commented out. Is that supposed to be like that? Where exactly do I have to add the configuration xpack.security.enabled: true and do I have to comment it out aswell?

When running bin/elasticsearch-setup-passwords auto, I keep getting the error:

Unexpected response code [500] from calling GET http://127.0.0.1:9200/_security/_authenticate?pretty
It doesn't look like the X-Pack security feature is enabled on this Elasticsearch node.
Please check if you have enabled X-Pack security in your elasticsearch.yml configuration file.

The same problems occurs when modifying the yml file for enterprise search.

Hello — It is normal for the lines to be commented. There are friendly defaults for all settings and the commented lines are there for ease of updates and guidance. You should add that line without commenting it, else it will have no effect.

Fixing that and restarting Elasticsearch should fix the second error.