How to add admin user programmatically?

hi i need to be able to generate apostrophy user admin programatically,
i need to run apostrophy automatically, i can make some modifications to app.js but
i don’t know how to add admin user automatically?

1 Like

Execute it as a command line task. You can pipe in the password you want:

echo "password" | node app apostrophe-users:add admin admin

That would add the admin user to the admin group. If you don’t have preconfigured groups you can create the group too:

node app apostrophe-groups:add admin admin

That adds an admin group with the admin permission.

1 Like