Users gone after using securityadmin.sh

So i will lose configuration from kibana when i use securityadmin.sh?

No, if you only load the config.yml instead of the entire /securityconfig/ dir you will retain your configured Kibana roles

do i need to setup every role and mapping again after running the script?

No

Can i export the settings i did to the .yml files?

You can back up the User and Roles files https://opendistro.github.io/for-elasticsearch-docs/docs/security-configuration/security-admin/#backup-restore-and-migrate

Here is the script I use when I reboot my cluster that does not erase any of the users and roles

./securityadmin.sh -h YOUR-HOST -cn YOUR-CLUSTER-NAME -f ../securityconfig/config.yml -nhnv -cacert ../../../config/root-ca.pem -cert ../../../config/admin.pem -key ../../../config/admin-key.pem
3 Likes