Opened 2 years ago

Closed 7 months ago

#64286 closed defect (fixed)

postgresql96-server creates an account that appears in fast user switching

Reported by: essandess (Steve Smith) Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: postgresql96-server

Description

postgresql96-server creates an account that appears in fast user switching because it unnecessarily sets the shell to /bin/sh.

To fix this on an existing account, set:

sudo dscl . -change /Users/postgres UserShell /bin/sh /usr/bin/false

Change History (7)

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to jyrkiwahlstedt
Port: postgresql96-server added
Status: newassigned

This appears to apply also to the other postgresql*-server ports as well as many other portfiles.

Another longstanding issue with the way postgresql*-server creates its user account is #24180.

comment:2 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Looks like base sets a newly created user's shell to /usr/bin/false by default, if the portfile doesn't override it. So the fix would be for postgresql*-server not to set shell, unless of course there is some reason why it requires this.

Unfortunately as far as I know there is no provision in MacPorts base for a port to alter its user account after it has been created.

Last edited 2 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 in reply to:  2 Changed 2 years ago by essandess (Steve Smith)

Please see https://github.com/macports/macports-ports/pull/13463.

Replying to ryandesign:

Looks like base sets a newly created user's shell to /usr/bin/false by default, if the portfile doesn't override it. So the fix would be for postgresql*-server not to set shell, unless of course there is some reason why it requires this.

Unfortunately as far as I know there is no provision in MacPorts base for a port to alter its user account after it has been created.

comment:4 Changed 2 years ago by essandess (Steve Smith)

Resolution: fixed
Status: assignedclosed

In 229e0780219f6aadd81dc9e9990699d029d652c5/macports-ports (master):

postgresql96-server: Remove shell from postgres user

comment:5 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: closedreopened

That only fixes one of the many postgresql*-server ports. Please fix them all the same way.

comment:6 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Also, you need to increase the revision in order for the change to take effect for any users who already installed the ports.

comment:7 Changed 7 months ago by dgilman (David Gilman)

Resolution: fixed
Status: reopenedclosed

In d3af627a1b5e66d5a583b217cbf7d7cc79102403/macports-ports (master):

postgresql16-server: new port

Closes: #24180
Closes: #64286

Note: See TracTickets for help on using tickets.