ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

can not edit in pg_ident.conf

asked 2012-12-16 06:37:14 -0500

Amal gravatar image


how to make pg_ident.conf easy accessible and edit on it.

any suggestion ?!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-12-17 05:06:53 -0500

updated 2012-12-17 15:16:54 -0500

You cannot edit this file because this file belongs to user postgres, you didn't have privilege to edit this file.This can be verified by using

ls -l /etc/postgresql/9.1/main/pg_ident.conf

You can edit this file in two ways.

1.Change to user postgres

sudo su - postgres

Then edit the file by

vim /etc/postgresql/9.1/main/pg_ident.conf

2.Use root privilege to edit the file

sudo vim /etc/postgresql/9.1/main/pg_ident.conf

If you didn't have vim installed yet, use

sudo apt-get install vim

Once you enter vim editor, press "i" to become INSERT mode, and you can edit the file. When you finished editing, type ":wq" to save the file and leave vim editor.

edit flag offensive delete link more


I have the same question of @Amal and when I tried to be a user postgres , a password for postgres was requested !


RiskTeam gravatar image RiskTeam  ( 2013-02-26 10:47:44 -0500 )edit

When you type sudo su - postgres to become user postgres, the password you need is your original user's.

Po-Jen Lai gravatar image Po-Jen Lai  ( 2013-03-01 00:36:27 -0500 )edit

yes, I have tried my original password ant it worked , but I have stopped at the step of making an administrator of my created database using pgadmin , There was an error that the version of pgadmin isn't suitable to the version of the postgreSQL.

RiskTeam gravatar image RiskTeam  ( 2013-03-01 23:18:17 -0500 )edit

Question Tools


Asked: 2012-12-16 06:37:14 -0500

Seen: 242 times

Last updated: Dec 17 '12