54 lines
1.7 KiB
Markdown
54 lines
1.7 KiB
Markdown
# libreschool-adminusers #
|
|
|
|
[](https://drone.libreschool.org/LibreSchool/libreschool-adminusers)
|
|
|
|
This package is meant for adding a local admin user to all clients.
|
|
|
|
## Requirements ##
|
|
|
|
A working [LibreSchool][] installation is required.
|
|
|
|
## Usage ##
|
|
|
|
At the moment we support only one user.
|
|
You can set a password and an ssh key.
|
|
|
|
Set the username (this is the default):
|
|
|
|
```bash
|
|
# db configuration setprop ansibleusers username libreschool
|
|
```
|
|
|
|
The default password is **"LibreSchool,1234"**.
|
|
|
|
Set the password (must be hashed, see [here](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-generate-encrypted-passwords-for-the-user-module)):
|
|
|
|
```bash
|
|
# ansible all -i localhost, -m debug -a "msg={{ 'LibreSchool,1234' | password_hash('sha512') }}"
|
|
localhost | SUCCESS => {
|
|
"msg": "$6$S8BJ2Bbc26fRtExf$hNjphQ2HhbeiKLhPOdHttx6vWZwB90KgeinpREGrgcOHW2qYxf9s/csC7LFoENskhzwXK0wcWV3X9rPTC57Vu."
|
|
}
|
|
# db configuration setprop ansibleusers password '$6$S8BJ2Bbc26fRtExf$hNjphQ2HhbeiKLhPOdHttx6vWZwB90KgeinpREGrgcOHW2qYxf9s/csC7LFoENskhzwXK0wcWV3X9rPTC57Vu.'
|
|
```
|
|
|
|
Set an ssh key:
|
|
|
|
```bash
|
|
# db configuration setprop ansibleusers sshkey "$(cat ~/.ssh/id_rsa.pub)"
|
|
```
|
|
|
|
## TODO / ideas ##
|
|
|
|
- check all supported distros for group membership
|
|
- add multiple admin support
|
|
- add multiple ssh key support
|
|
- remove ssh key when not set
|
|
|
|
## License ##
|
|
|
|
As the rest of the LibreSchool project, libreschool-adminusers is licensed under [GPLv3][] license.
|
|
|
|
[LibreSchool]: https://libreschool.org "LibreSchool Project Homepage"
|
|
[NethServer]: https://www.nethserver.org
|
|
[GPLv3]: https://www.gnu.org/licenses/gpl-3.0.html
|