Hi Mike, There is an open Jira to implement this script feature for Windows:
https://issues.apache.org/jira/browse/NIFI-9500 The issue also includes a workaround that can be used to call the Java class directly, following the details that Breno provided: java -cp 'lib/bootstrap/*' -Dnifi.properties.file.path=conf/nifi.properties org.apache.nifi.authentication.single.user.command.SetSingleUserCredentials username passwordpassword Regards, David Handermann On Fri, Feb 18, 2022 at 6:14 AM Breno Cesar <[email protected]> wrote: > Hi Milke, > > As far as i know no, you could try: > - Use nifi toolkit cli, you can manage your instance users there. > - Run nifi in wsl2 if is a dev/test environment, so the nifi.sh will work. > - Try to run a java command by it self as the conditional inside the > nifi.sh: > if [ "$1" = "set-single-user-credentials" ]; then > run_command="'${JAVA}' -cp '${BOOTSTRAP_CLASSPATH}' > '-Dnifi.properties.file.path=${NIFI_HOME}/conf/nifi.properties' > 'org.apache.nifi.authentication.single.user.command.SetSingleUserCredentials'" > eval "cd ${NIFI_HOME}" > shift > eval "${run_command}" '"$@"' > EXIT_STATUS=$? > echo > return; > fi > > > *Breno* > > > > > Em sex., 18 de fev. de 2022 às 09:00, Mike Thomsen <[email protected]> > escreveu: > >> Is there a Windows equivalent to ./nifi.sh set-single-user-credentials >> for automating the setup of the admin user on a vanilla installation? >> >> Thanks, >> >> Mike >> >
