Files
claudetools/reset-gitea-password.sh
Mike Swanson b87e97d3ba feat: Add directives system and DOS management utilities
Implemented comprehensive directives system for agent coordination:
- Created directives.md (590 lines) - Core operational rules defining
  coordinator vs executor roles, agent delegation patterns, and coding
  standards (NO EMOJIS, ASCII markers only)
- Added DIRECTIVES_ENFORCEMENT.md - Documentation of enforcement
  mechanisms and checklist for validating compliance
- Created refresh-directives command - Allows reloading directives
  after Gitea updates without restarting Claude Code
- Updated checkpoint and save commands to verify directives compliance
- Updated .claude/claude.md to mandate reading directives.md first

Added DOS system management PowerShell utilities:
- check-bat-on-nas.ps1 - Verify BAT files on NAS match source
- check-latest-errors.ps1 - Scan DOS error logs for recent issues
- check-plink-references.ps1 - Find plink.exe usage in scripts
- check-scp-errors.ps1 - Analyze SCP transfer errors
- check-sync-log.ps1 (modified) - Enhanced sync log analysis
- check-sync-status.ps1 - Monitor sync process status
- copy-to-nas-now.ps1 - Manual NAS file deployment
- find-error-logging.ps1 - Locate error logging patterns
- fix-copy-tonas-logging.ps1 - Repair logging in copy scripts
- fix-dos-files.ps1 - Batch DOS file corrections
- fix-line-break.ps1 - Fix line ending issues
- fix-plink-usage.ps1 - Modernize plink.exe to WinRM
- push-fixed-bat-files.ps1 - Deploy corrected BAT files
- run-sync-direct.ps1 - Direct sync execution
- test-error-logging.ps1 - Validate error logging functionality
- trigger-sync-push.ps1 - Initiate sync push operations
- verify-error-logging.ps1 - Confirm error logging working
- scripts/fix-ad2-error-logging.ps1 - Fix AD2 error logging

Added Gitea password management scripts:
- Reset-GiteaPassword.ps1 - Windows PowerShell password reset
- reset-gitea-password.sh - Unix shell password reset

Key architectural decisions:
- Directives system establishes clear separation between Main Claude
  (coordinator) and specialized agents (executors)
- DOS utilities modernize legacy plink.exe usage to WinRM
- Error logging enhancements improve troubleshooting capabilities
- All scripts follow PSScriptAnalyzer standards

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-19 15:52:28 -07:00

73 lines
2.0 KiB
Bash

#!/bin/bash
# Reset Gitea password for mike@azcomputerguru.com
# Run this on Jupiter server (172.16.3.20) as root
# Note: Gitea runs in Docker container
echo "=== Gitea Password Reset (Docker) ==="
echo ""
# Check if running as root
if [ "$EUID" -ne 0 ]; then
echo "[ERROR] This script must be run as root"
exit 1
fi
# Find Gitea Docker container
echo "[1] Finding Gitea Docker container..."
CONTAINER=$(docker ps --filter 'name=gitea' --format '{{.Names}}' | head -n 1)
if [ -z "$CONTAINER" ]; then
echo "[ERROR] Cannot find Gitea container"
echo ""
echo "Available containers:"
docker ps --format '{{.Names}}'
exit 1
fi
echo "[OK] Found container: $CONTAINER"
echo ""
echo "[2] Current Gitea users:"
docker exec $CONTAINER gitea admin user list 2>/dev/null || \
echo "[WARNING] Could not list users"
echo ""
echo "[3] Resetting password for: mike@azcomputerguru.com"
echo ""
# Prompt for new password
read -sp "Enter new password: " NEW_PASSWORD
echo ""
read -sp "Confirm password: " CONFIRM_PASSWORD
echo ""
if [ "$NEW_PASSWORD" != "$CONFIRM_PASSWORD" ]; then
echo "[ERROR] Passwords do not match"
exit 1
fi
if [ -z "$NEW_PASSWORD" ]; then
echo "[ERROR] Password cannot be empty"
exit 1
fi
echo ""
echo "[4] Executing password change..."
# Reset password using docker exec (try username 'mike' first, then email)
docker exec $CONTAINER gitea admin user change-password --username mike --password "$NEW_PASSWORD" 2>&1 || \
docker exec $CONTAINER gitea admin user change-password --username mike@azcomputerguru.com --password "$NEW_PASSWORD" 2>&1
if [ $? -eq 0 ]; then
echo ""
echo "[SUCCESS] Password reset complete!"
echo ""
echo "You can now login at: https://git.azcomputerguru.com/"
echo "Username: mike@azcomputerguru.com (or just 'mike')"
echo "Password: (the one you just set)"
else
echo ""
echo "[ERROR] Password reset failed"
echo "Try running manually with different username format"
fi