Use bash as login shell for postgres user

System users should use the nologin shell to deny logging as those are
not interactive users but a lot of existing documentation incorreclty
uses 'su' or 'sudo su' to create a shell under the postgres user for
PostgreSQL management.

Revert back to using '/bin/bash' as the login shell.

See: https://src.fedoraproject.org/rpms/postgresql/pull-request/60
Fixes: 3646f8d Use sysusers configuration to setup user & group
This commit is contained in:
Timothée Ravier 2023-07-13 19:18:40 +02:00
parent bf2a7ae5c1
commit 98e117038e
2 changed files with 5 additions and 2 deletions

View File

@ -65,7 +65,7 @@ Summary: PostgreSQL client programs
Name: postgresql Name: postgresql
%global majorversion 15 %global majorversion 15
Version: %{majorversion}.3 Version: %{majorversion}.3
Release: 6%{?dist} Release: 7%{?dist}
# The PostgreSQL license is very similar to other MIT licenses, but the OSI # The PostgreSQL license is very similar to other MIT licenses, but the OSI
# recognizes it as an independent license, so we do as well. # recognizes it as an independent license, so we do as well.
@ -1262,6 +1262,9 @@ make -C postgresql-setup-%{setup_version} check
%changelog %changelog
* Thu Jul 13 2023 Timothée Ravier <tim@siosm.fr> - 15.3-7
- Use bash as login shell for postgres user
* Thu Jul 13 2023 František Zatloukal <fzatlouk@redhat.com> - 15.3-6 * Thu Jul 13 2023 František Zatloukal <fzatlouk@redhat.com> - 15.3-6
- Rebuilt for ICU 73.2 - Rebuilt for ICU 73.2

View File

@ -1 +1 @@
u postgres 26 "PostgreSQL Server" /var/lib/pgsql u postgres 26 "PostgreSQL Server" /var/lib/pgsql /bin/bash