Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the second answer in this thread is a warning about changing the UNIX password for "postgres".
I have already changed the password for "postgres".
How could I restore the initially state of the user "postgres"?

share|improve this question
up vote 2 down vote accepted

Like the comments in this answer suggest, just edit the file /etc/shadow as root (e.g. run sudo nano /etc/shadow in a terminal) and replace the hashed password in postgres's line with *.

(If you don't have that line or that file, it'd be interesting to know which Linux distribution and nsswitch settings you use.)

share|improve this answer
I have overlooked the comments. – sid_com Jan 15 '13 at 17:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.