From: | HORDER Philip <Phil(dot)Horder(at)uk(dot)thalesgroup(dot)com> |
---|---|
To: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | How do I specify the NetworkService user to the postgres installer. |
Date: | 2025-09-18 09:58:11 |
Message-ID: | 1a55b2a6d4f54a9a8a67cff9937abc9e@uk.thalesgroup.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Classified as: {OPEN}
Hi all.
I'm installing Postgres 17.3.5
Running Windows 11, but on an office machine that I have limited control over the environment.
This *was* working, running from a batch script:
%POSTGRES_INSTALLER% --mode unattended --unattendedmodeui minimal --superaccount %BIGBOSSMAN% --superpassword %PGPASSWORD% --datadir D:\Postgres\17\data --serverport %PGPORT% --enable-components server,pgAdmin,commandlinetools
However, the elevated rights environment I have to use has been changed by the IT overlords.
I don't know what's changed, but the installer now fails in the initdb phase, and doesn't create the Windows service:
running bootstrap script ... Execution of PostgreSQL by a user with administrative permissions is not
permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromises. See the documentation for
more information on how to properly start the server.
By default, the service would run as user Network Service.
But now the installer is either picking a different Windows user, or thinks that the NetworkService has admin permissions.
I've found separate commands to register the service with -U "NT AUTHORITY\NetworkService", but want to do this in one step, rather than allowing the installer to fail, and then manage additional steps to initialise the database and create a service.
Trying to give this to the installer doesn't work:
%POSTGRES_INSTALLER% --mode unattended --unattendedmodeui minimal --serviceaccount "NT AUTHORITY\NetworkService" --superaccount %BIGBOSSMAN% --superpassword %PGPASSWORD% --datadir D:\Postgres\17\data --serverport %PGPORT% --enable-components server,pgAdmin,commandlinetools
What arguments can I pass the installer to get it to use the correct Windows account to run the service?
Thanks,
Phil Horder
Database Mechanic
Thales
Land & Air Systems
Horizon House, Throop Road, Templecombe, Somerset, BA8 0DH, UK
www.thalesgroup.com/uk<../../../../../../t0038633/Application%20Data/Microsoft/Signatures/www.thalesgroup.com/uk>
Telephone: +44 (0)1963 372041
Mobile: +44 (0)771 765 2467
{OPEN}
The information contained in this e-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this e-mail. Such unauthorised use may be unlawful. If you have received this e-mail in error, please inform the originator immediately and delete it and all copies from your system.
Thales UK Limited. A company registered in England and Wales. Registered Office: 350 Longwater Avenue, Green Park, Reading, Berks RG2 6GF. Registered Number: 868273
Please consider the environment before printing a hard copy of this e-mail.
From | Date | Subject | |
---|---|---|---|
Next Message | Wim Rouquart | 2025-09-18 12:25:38 | Index (primary key) corrupt? |
Previous Message | Daniel Westermann (DWE) | 2025-09-17 05:46:36 | Re: EDB Windows Installer on Windows Server 2025 |