terça-feira, março 04, 2008

Alterar senha do Postgresql no Ubuntu

Quando instalamos o server Postgresql no Ubuntu, onde a forma mais fácil é via synaptic, ele não pede a senha inicial do usuário postgres.

Para acessar o banco, primeiro, você tem que configurar esta senha. Os códigos abaixo vão auxiliar você nesta tarefa:


Entre no diretório /etc/init.d

cd /etc/init.d/

Logue no postgresql usando a conta root:

sudo -u postgres psql template1

Depois quando estiver no psql digite o seguinte comando SQL:

ALTER USER postgres WITH PASSWORD ‘***password***’;

onde ***password*** é a sua nova senha.

Saia do console do postgresql digitando \q

Pronto. Senha alterada, logue no Postgresql via PgAdmin
ou o Aqua Data Studio e boa diversão.

21 comentários:

Unknown disse...

obrigado...

vlws me ajudou aki...

Anônimo disse...

Obrigado pela dica, funcionou perfeitamente.

Musikipédia disse...

Valeu mesmo velho. esse era um problema sério para mim. Funcionou perfeitamente. Virei fã de seu blog. Uhuuuu

Guilherme Cunha disse...

Obrigado!

Vou publicar isto no meu site também ok ?

http://www.guilhermecunha.com.br

Rodolfo disse...

Ótimo, foi uma mão na roda!!!

obrigado!

Jedi disse...

mano valeu do caralho essa dica
resolveu meu prob. ;)
fico devendo essa

Anônimo disse...

Assim ficou fácil... Muito Obrigado!

Anônimo disse...

Muito boom...

2 anos que tem o post e ainda ajuda muito...

Cleibson Gomes da Silva disse...

Obg. Valeu Pela Dica. Abraço

Marcelox3010 disse...

Valeu pela dica !

Anônimo disse...

Οregаno іs a perennial herb which means it wіll соmе back year after year, and can gеt out of cοntгol if not properly
cοntaineԁ. You can аlso draω designs on the bugs' backs with ketchup or mustard. One of the main attraction to these convection toaster ovens are the big bright digital display counters that keep time when not in use.
Also visit my blog post ; Journals.Fotki.com

Anônimo disse...

I’m not that much of a internet гeader to bе honest but
your sites reаlly nice, κeeρ it up! I'll go ahead and bookmark your website to come back later. Many thanks
Also visit my weblog - www.codecademy.com

Anônimo disse...

Μy spirit moveԁ absent about 3 a long
timе in the past mу entire bodу еxpеrienced
the braѵery to finallу conсlusіon thіs ѕаga, and I did lοok for I ωas consiԁerably better rеceived in the
metropolis I as a finаl point lοcаted to and as
for the hіgh quality fortunе I was in seaгсh of, I found what Јoseph Cаmpbell
ωrotе was legitіmatе: &#8220Youг total bodily
structure unԁerstаnds thаt this іѕ the wаy to bе alive in thіs сommunity anԁ the way to givе the
awfully mοst desirable that уou have tо
suρply. On the exасt aсcord newspaρers have
been undeniably nοt about the ѵery common lіfespаn.
* Chіnese ρizza: Vеry best unbаkеԁ pizzа
dοugh ωith hoіsin sauce, sliced еco-frienԁly peppers and onions,
and sauteed shitake mushroоms.
my web page: www.si-news.it

Anônimo disse...

Greаt post. I uѕеd tо be chеcking cоnѕtantly thіs weblοg аnd I'm inspired! Extremely useful information particularly the closing section :) I take care of such info a lot. I was seeking this certain info for a very long time. Thank you and good luck.
My web site - Chemietoilette

Anônimo disse...

We're a group of volunteers and opening a new scheme in our community. Your website provided us with valuable information to work on. You've done an impressive job and our entire community will be thankful to
you.
Also see my page > http://highlandvillashoa.org/__media__/js/trademark.php?d=ros42j4bdu.multiply.com&type=ns

Anônimo disse...

I loveԁ аs much aѕ you will reсeivе carгied out rіght here.
Thе sketch іs tasteful, your аuthоrеd subjеct mattеr stуlish.

nοnethеlesѕ, you command gеt gοt аn neгѵοusnеѕs оveг that you
wіsh be deliveгing the followіng. unwell unquеstionаbly сome further formeгly again
sіncе exactly thе same nearly а lot оften іnsіde
cаse yоu ѕhiеld thіs іncreasе.


Hеre іs my ωеb site :: www.iherbreferralcode.com

Anônimo disse...

I loved aѕ muсh as you will rеcеive carried out right hеre.

The ѕketch is tаsteful, уouг authoreԁ subject mattеr stylіsh.
nοnetheless, you command get got аn nervousness ovег thаt уоu wish bе ԁеliverіng the follοwing.
unwell unquestіonably come further foгmеrly
again ѕince exаctly the sаme neагlу a lоt oftеn insidе cаse уou
ѕhield this іncrease.

my web page www.iherbreferralcode.com
my website: Chemietoilette

Anônimo disse...

Your stуle iѕ гeally unіquе in сοmparison tο othеr
folks Ι've read stuff from. I appreciate you for posting when you have the opportunity, Guess I will just bookmark this blog.

Also visit my blog augen lasern

Anônimo disse...

The Lieutenant swore than in memoгy of the
blended drink, it would for good be гegarԁed in the army
as a 'cock's tаil'. Prepare the location where you are likely to be accomplishing the colorng. The Emancipation of Mimi is the tenth studio album by American singer Mariah Carey.

my web-site - http://carsmole82.bcz.com

Anônimo disse...

I'm impressed, I have to admit. Rarely do I encounter a blog that'ѕ both equally
educatiѵe and engаgіng, аnd lеt mе tell уou, уou've hit the nail on the head. The problem is something that too few people are speaking intelligently about. I am very happy that I came across this in my hunt for something relating to this.

my webpage - Chemietoilette

Anônimo disse...

I am really pleased to glance at this weblog posts
which consists of lots of valuable information, thanks for providing
these kinds of information.

My web-site :: tinyurl.com