I’m planning to deploy a instance of Yunohost for a bunch of friends, a bit like a small-scale chaton.
I want it to be based on Yunohost both for its SSO feature <3 and because I’d also like to offer them to host their own instance in a later phase (so they already know the “product”).
Last step would be that they get their independence and setup an internet cube at home (one can dream, right?).
But, there is an issue: I don’t want to setup an account for everyone manually, then sent them their password on clear-text per mail, hoping they would change it.
In case you have to do it in this way, install Zerobin app, and send the password in this way, with burn after reading option activated.
And maybe generate a random (long) password, so they will copy-paste it and change it because it’s annoying
Solution 2: code your own
If you know PHP, have a look at my API: https://github.com/scith/yunohost-api-php
In my readme I have a code snippet to create a user.
What you have to do is to code a PHP page with a form.
However, there may be some security flaws, as the PHP api needs your YunoHost admin password… Not ideal. You can hardcore your admin password in your PHP file, which should be OK if you’re sure that nobody can access your source code (and if PHP does not stop to be interpreted by the server)…
Great! With your api and my low dev leve, I was already able to have a simple but working Registration form in less than an hour.
Now, I need to make it bit more robust and good-looking.
But it totally fulfilled my needs. Thanks again.
If I can be picky, it would be nice to have error handling (existing username for example).
@Petitminion It would be a pleasure, but honestly it’s not in a state in which I can be shared.
It has plenty of hardcoded things specific to my instance, and it’s just a style-less html form that sends 4 data (fist name, last name, username and password) to a php script that generate the user and prints a also style-less html page that links to the major services of my instance.
It has no security whatsoever, is ugly and cannot be used as-is.
But you gave me the desire to make it better. I might take advantage of the current situation (covid lockdown) to dedicate some time to it. But if I succeed, it will certainly be low quality anyway (not a developer).