Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

apache auth.

1 view
Skip to first unread message

zeneca

unread,
Feb 26, 2022, 3:23:03 AM2/26/22
to
Hello,
I would like to have authentication based on random numbers (7)
generated at demand and displayed on a small screen next to the system.
Precisions:
The system run on a raspberry zero, apache, mysql php.
The display is a small nokia 5110 display giving temperature and on
demand a code to used to login as administrator. Other usage doesn't
require login.
The generated code is only to be used once.
Many thanks in advance

Kees Nuyt

unread,
Feb 26, 2022, 8:52:24 AM2/26/22
to
On Sat, 26 Feb 2022 09:22:57 +0100, zeneca <pas...@ailleur.fr>
wrote:
Configure apache to use basic authentication using .htpasswd
https://httpd.apache.org/docs/current/howto/auth.html
or any similar method.

Write a script that can run a a service, pseudocode:
1- wait for a trigger, e.g. user pressing a button,
indicating [s]he wants to login
2- generate a password, e.g. using openssl rand ....
3- generate a .htpasswd file using htpasswd -b ....
https://httpd.apache.org/docs/current/programs/htpasswd.html
4- display the password on the display (off topic here)
5- back to step 1

configure systemd to start that script as a service (off topic
here).

Good luck, enjoy
--
Regards,
Kees Nuyt
0 new messages