Hi,
for people who like to manage cars and owners for a server V2 without Drupal:
you find a bash script to manage the cars and owners directly in the database at
 https://github.com/zbchristian/ovms-server-docker.git (scripts/manage-db.sh)

The script expects to find the configuration at the relative path "server/conf/ovms_server.conf" and extracts the DB user, DB password, DB host from it.

Per default, the script stores the owner passwords in the DB as a Bcrypt hash. But its easy to change this to cleartext or another hashing method (function _pw_hash).

The script can initialize the DB as well (see Readme).

The script is part of my docker-compose setup for a minimal server V2 (only API V2, no Drupal, no HTTP API).

Hope this helps.

Regards
  Christian


Am 14.03.2025 um 00:48 schrieb Mark Webb-Johnson via OvmsDev:
Chris,

If you’d like to provide a simple contribution to the project it would be:


For users wanting to run their own server, but only having one user, that would be useful.

Regards, Mark.

On 14 Mar 2025, at 12:38 AM, Chris van der Meijden via OvmsDev <ovmsdev@lists.openvehicles.com> wrote:

OK, it was not that hard ...

In the AuthNone.pm I changed the sub Authenticate to

sub Authenticate
{
my ($user,$password) = @_;
if ($user eq "xxx" && $password eq "yyy") {
return '*';
} else {
return ''; 
}
}

and activated AuthNone in the ovms_sever.conf



Am Donnerstag, dem 13.03.2025 um 11:34 +0100 schrieb Chris van der Meijden via OvmsDev:
I'm trying to connect our e-UP to EVCC using the http api.

This fails, because I don't have a Drupal server installed. I only found AuhDrupal and AuthNone as modules for the the server.

I don't want to install a Drupal instance for only one user, so I'm now trying to write a AuthSimple module for only one user with the username and password included in the code (I know, unsecure), so that the authentication for that user goes through and I get the variables I need for EVCC.

Before I reinvent the wheel, does a code snippet perhaps exists, that does the trick?

Regards

Chris
_______________________________________________
OvmsDev mailing list

_______________________________________________
OvmsDev mailing list
OvmsDev@lists.openvehicles.com
http://lists.openvehicles.com/mailman/listinfo/ovmsdev


_______________________________________________
OvmsDev mailing list
OvmsDev@lists.openvehicles.com
http://lists.openvehicles.com/mailman/listinfo/ovmsdev