Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac installer - firebird user not created correctly if group already exists #7241

Closed
hmoffatt opened this issue Jul 26, 2022 · 3 comments
Closed

Comments

@hmoffatt
Copy link

If the firebird group already exists but the user doesn't (which can occur if you use the new Mac transfer process / migration assistant), the installer creates a new user that is has no primary group, which is invalid, and the Firebird service won't start.

This occurs because of a bug in the install-script:

  1. line 25 determines that the group already exists, so $gid is not set
  2. line 58 uses the unset $gid as the primary group id of the user

Now macOS won't use the new user, and you can't "su - firebird" etc to it, until the group id is set.

@e787
Copy link
Contributor

e787 commented Aug 16, 2022

Hi @hmoffatt,

I've added this code after line 25:
gid=$(dscl localhost -read /Local/Default/Groups/firebird PrimaryGroupID | awk '($1 == "PrimaryGroupID:") { print $2 }')
Which should get the ID from the group if it's found by the script.

Here's a patch file: patch.tar.gz

Could you try if this solves the problem?

P.S.: I'm no shell script expert, just trying my best to help.

@hmoffatt
Copy link
Author

Thanks @e787 , it looks good to me on code review, and your command certainly extracts the existing gid ok. I don't have the failing environment any more and I don't know how to build Firebird including the Mac packaging, so I didn't test it in context.

asfernandes added a commit that referenced this issue Aug 17, 2022
…oup already exists.

Solution by: Jonathan Frutos
@asfernandes
Copy link
Member

Thanks, I committed the fix in master and v4 branch.

You may download installer here after the build is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants