diff --git a/bin/README.md b/bin/README.md index 5dea344..9bc32dd 100644 --- a/bin/README.md +++ b/bin/README.md @@ -4,8 +4,8 @@ This directory contains pre-compiled binaries for the DB Backup Tool across mult ## Build Information - **Version**: 3.42.34 -- **Build Time**: 2026-01-16_08:42:47_UTC -- **Git Commit**: a85ad0c +- **Build Time**: 2026-01-16_12:38:18_UTC +- **Git Commit**: 510175f ## Recent Updates (v1.1.0) - ✅ Fixed TUI progress display with line-by-line output diff --git a/internal/auth/helper.go b/internal/auth/helper.go index 52c664e..e1ae775 100755 --- a/internal/auth/helper.go +++ b/internal/auth/helper.go @@ -84,19 +84,13 @@ func findHbaFileViaPostgres() string { // parsePgHbaConf parses pg_hba.conf and returns the authentication method func parsePgHbaConf(path string, user string) AuthMethod { - // Try with sudo if we can't read directly + // Try to read the file directly - do NOT use sudo as it triggers password prompts + // If we can't read pg_hba.conf, we'll rely on connection attempts to determine auth file, err := os.Open(path) if err != nil { - // Try with sudo (with timeout) - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) - defer cancel() - - cmd := exec.CommandContext(ctx, "sudo", "cat", path) - output, err := cmd.Output() - if err != nil { - return AuthUnknown - } - return parseHbaContent(string(output), user) + // If we can't read the file, return unknown and let the connection determine auth + // This avoids sudo password prompts when running as postgres via su + return AuthUnknown } defer file.Close()