Securityadmin.sh won't run

Hi guys , lately i faced a problem executing secutityadmin.sh to update security from config.yml
i executed this command :

sh securityadmin.sh -cacert C:\Elastic\elasticsearch-7.4.0\config\root-ca.pem -cert C:\Elastic\elasticsearch-7.4.0\config\kirk.pem -key C:\Elastic\elasticsearch-7.4.0\config\kirk-key.pem -f C:\Elastic\elasticsearch-7.4.0\plugins\opendistro_security\securityconfig\config.yml -t config

and it gves me this error
securityadmin.sh: line 27: syntax error: unexpected end of file

Any idea what am i doing wrong
opendistro 1.4.0

Thanks in advance

1 Like

@HeiDri I can’t speak to this problem specifically but 1.4.0 is several version behind (1.10.x is current and another version is coming out very soon). Have you tried this in a more up-to-date version of Open Distro?

@HeiDri you can open securityadmin.sh in any editor \ viewer and then copy-paste lines 26-28 there?

hi @Serge thanks for your reply, it works now i had a problem with cygwin , there was not a problem with the securityadmin file , but i’m facing another problem which is when i run the file it won’t show anything in cmd !! i’ve changed the config.yml and run it and nothing happens !!
this is my command line
sh securityadmin.sh -cacert C:\Elastic\elasticsearch-7.4.0\config\root-ca.pem -cert C:\Elastic\elasticsearch-7.4.0\config\kirk.pem -key C:\Elastic\elasticsearch-7.4.0\config\kirk-key.pem -f C:\Elastic\elasticsearch-7.4.0\plugins\opendistro_security\securityconfig\config.yml -t config

Ps : the file used to work correctly
thank you.