• Map linux user to postgresql user

    From Bhuvanesh R@21:1/5 to All on Thu May 4 07:21:31 2017
    I want to map Linux's root user to Postgres user, like if I enter psql in root user it should go the PostgreSQL cli without asking any authentication.


    I tried to add an entry in pg_ident.conf and make the necessary changes in pg_hba.conf, but it didn't work.

    psql: FATAL: role "root" does not exist
    Postgresql Version 9.6

    pg_ident.conf
    # MAPNAME SYSTEM-USERNAME PG-USERNAME
    root root postgres

    pg_hba.conf
    # TYPE DATABASE USER ADDRESS METHOD
    local all all peer map=root
    host all all 127.0.0.1/32 ident map=root
    Any suggestions to achieve this?

    I need to map multiple Linux users. The above one is for who all are using root user.


    The same question posted in Stackoverflow.

    https://dba.stackexchange.com/questions/172573/postgresql-map-a-linux-user-to-login

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)