HexaCluster / pgdsat

PostgreSQL Database Security Assessment Tool

Home Page:https://hexacluster.ai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

password asking multiple times for postgres user

kbharathdba28 opened this issue · comments

followed github instructions to configure pgdsat tool but its asking password for postgres user continuously.

[postgres@RHEL8 ~]$ pgdsat -U postgres -h localhost -d postgres -o report.html
Password for user postgres:
Password for user postgres:

followed below steps:

  1. wget https://github.com/HexaCluster/pgdsat/archive/refs/tags/v1.1.tar.gz
  2. untar the downloaded file (tar -xvf v1.1.tar.gz)
  3. perl Makefile.PL
  4. make
  5. sudo make install
  6. dnf install perl-bignum perl-Math-BigRat
    7)[postgres@RHEL8 ~]$ cat .bash_profile
    [ -f /etc/profile ] && source /etc/profile
    #PGDATA=/var/lib/pgsql/16/data
    #export PGDATA
    PATH=/usr/pgsql-16/bin:$PATH:$HOME/bin
    PGDATA=/var/lib/pgsql/16/data/
    PGHOME=/usr/pgsql-16/bin
    PGPORT=5432
    PGUSER=postgres
    export PATH PGDATA PGPORT PGUSER PGHOME

If you want to customize your settings,

Use the file below. This is not overridden

by the RPMS.

#[ -f /var/lib/pgsql/.pgsql_profile ] && source /var/lib/pgsql/.pgsql_profile
. /etc/bashrc
[ -f /var/lib/pgsql/.pgsql_profile ] && source /var/lib/pgsql/.pgsql_profile"
[postgres@RHEL8 ~]$

pgsdat use the psql command multiple time to collect information. You should either set the PGPASSWORD environment variable or better, create a .pgpass file with the connection information.