From: Karim Mardhani <karim@zeecore.net>
To: pgsql-admin@postgresql.org
Subject: Postgres service user keeps losing password
Date: Tue, 12 Jul 2005 23:47:54 -0600
Message-ID: <003801c5876e$6a40ef80$0200a8c0@ipsolution1> (raw)
Hi All:
I am having an interesting problem with the user which starts postmaster as service.
I am using postgres 8.0.1 as backend to my stand alone windows application. My installation program installs postgres in silent mode and sets it to start as windows service. Before installing postgres my installation program creates a user by running following script:
net user /add /y postgres mypassword /EXPIRES:NEVER /COMMENT:"PostgreSQL Service Account" /FULLNAME:"Postgres Service Account"
ntrights -u postgres +r SeServiceLogonRight
ntrights -u postgres +r SeNetworkLogonRight
ntrights -u postgres +r SeInteractiveLogonRight
After creating the user the installation program installs postgres as windows service by using following command:
msiexec /i postgresql-8.0-int.msi /qb! INTERNALLAUNCH=1 ADDLOCAL=server,psql SERVICEDOMAIN=%COMPUTERNAME% SERVICEPASSWORD=mypassword SERVICENAME=pgdb SUPERPASSWORD=supperpassword PERMITREMOTE=1
So this works fine till the end user actually power cycles the PC rather than shutting it down properly from the start menu. Basically when the windows starts up after the power cycle the postgres service doesn't start. The error it gives is 1069 "logon failure". The only way to fix this is to reset the passward for the user "postgres" to "mypassword" and after that every thing works fine till next power cycle happens. This has been seen on both windows 2000 and windows xp. Also I can't even use NET USER command to reset the password. The password must be reset from "users and password" GUI.
So the question I have is why a power cycle causes the system to lose the passward for this user? It doesn't happen to any other user. There are quite a few other users in the system. Also why can't "net user" utility be used to reset the password. Does anybody see any thing obvious with the way installation program creates the user?
Any help in this regard would greatly appreciated.
Thanks
Karim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: karim@zeecore.net
Subject: Re: Postgres service user keeps losing password
In-Reply-To: <003801c5876e$6a40ef80$0200a8c0@ipsolution1>
References: <003801c5876e$6a40ef80$0200a8c0@ipsolution1>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox