libraries: improve krb5 file generateion