Files
guru-connect/scripts/reset-admin-password.rs
Mike Swanson e3e95f8fa7
Some checks failed
Build and Test / Build Server (Linux) (push) Has been cancelled
Build and Test / Build Agent (Windows) (push) Has been cancelled
Build and Test / Security Audit (push) Has been cancelled
Build and Test / Build Summary (push) Has been cancelled
Run Tests / Test Server (push) Has been cancelled
Run Tests / Test Agent (push) Has been cancelled
Run Tests / Code Coverage (push) Has been cancelled
Run Tests / Lint and Format Check (push) Has been cancelled
chore: sync repository to current working state
Brings azcomputerguru/guru-connect up to the authoritative working copy that
had been maintained in the claudetools monorepo: Phase 1 security and
infrastructure (middleware, metrics, utils, token blacklist, deployment
scripts, security audits) plus the native-remote-control integration spec.
Preserves the repo .gitignore, .cargo, and server/static/downloads.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 06:15:29 -07:00

28 lines
743 B
Rust

// Temporary password reset utility
// Usage: cargo run --manifest-path scripts/Cargo.toml --bin reset-admin-password
use argon2::{
password_hash::{PasswordHasher, SaltString},
Argon2, Algorithm, Version, Params,
};
use rand_core::OsRng;
fn main() {
let password = "AdminGuruConnect2026"; // Temporary password (no special chars)
let argon2 = Argon2::new(
Algorithm::Argon2id,
Version::V0x13,
Params::default(),
);
let salt = SaltString::generate(&mut OsRng);
let password_hash = argon2
.hash_password(password.as_bytes(), &salt)
.expect("Failed to hash password")
.to_string();
println!("Password: {}", password);
println!("Hash: {}", password_hash);
}