Hi Nicolas,
We do try to figure out the correct configuration directory in the esusers tool. It seems as though there may be some issues with the logic there.
For the docker instance, does /etc/sysconfig/elasticsearch exist? If so this is why shield is trying to write into /etc/elasticsearch since the default install for a RPM puts the sysconfig file there and that is the default config directory for a RPM installation of elasticsearch.
In your vagrant instance, how did you install elasticsearch?
-Jay