Skip to content

(PUP-2454) User ID's below 1000, not 500, are generally considered system users on OpenBSD#2547

Closed
jasperla wants to merge 1 commit intopuppetlabs:masterfrom
jasperla:unless_system_user
Closed

(PUP-2454) User ID's below 1000, not 500, are generally considered system users on OpenBSD#2547
jasperla wants to merge 1 commit intopuppetlabs:masterfrom
jasperla:unless_system_user

Conversation

@jasperla
Copy link
Contributor

Users can still modify this with 'uid_start' in adduser.conf, but in that
case they'd need to provide an actual value instead of 'true'.

@puppetcla
Copy link

CLA signed by all contributors.

@jasperla jasperla changed the title User ID's below 1000, not 500, are generally considered system users on OpenBSD (PUP-2454) User ID's below 1000, not 500, are generally considered system users on OpenBSD May 4, 2014
@ffrank
Copy link
Contributor

ffrank commented May 14, 2014

I'd like to see this change prefaced with a refactor so that this magic number is segregated into its own method. The change itself will then only affect that method.

As was mentioned during the PR, this change would also make sense for the 'Debian' value of operatingsystem. To that end, I'd prefer to see this done with a case statement, even though there are currently only those two cases apart from default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like Debian system UIDs span from 100 to 999:

# /etc/login.defs
# System accounts
#SYS_UID_MIN>...>.......  100
#SYS_UID_MAX>...>.......  999

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, so we could consider accounts <= 999 to be system accounts (thereby ignoring 0 < x <= 99)? Come to think of it, for OpenBSD it should be 999 too since UID 1000 would be the first regular user account.

Shall I merge the OpenBSD and Debian case into a single case returning '999'?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On 05/21/2014 08:14 PM, Jasper Lievisse Adriaanse wrote:

Shall I merge the OpenBSD and Debian case into a single case returning
'999'?

Fine by me.

…on OpenBSD.

Users can still modify this with 'uid_start' in adduser.conf, but in that
case they'd need to provide an actual value instead of 'true'.

While here, include Debian to the list of systems with system user UIDs < 1000
@ffrank
Copy link
Contributor

ffrank commented May 25, 2014

Argh dammit I just realized - this likely also applies to Ubuntu.

Perhaps it would be safer to rely on osfamily instead of operatingsystem?

@peterhuene
Copy link
Contributor

Yeah, I think using osfamily here instead of operatingsystem is best since the Debian family all use 999. Also, doesn't FreeBSD do so as well? At least the ports documentation mentions the range 50-999 for package accounts.

@jasperla Can you push up that fix and possibly a spec example that tests system_users_max_uid for these osfamilys? I will then merge it in. Thanks!

@peterhuene
Copy link
Contributor

Hi @jasperla. I'm going to close this PR in favor of GH-2736. I've amended your commit message and added some spec examples. Thanks again for your contribution!

@peterhuene peterhuene closed this Jun 3, 2014
@jasperla
Copy link
Contributor Author

jasperla commented Jun 4, 2014

Sorry for not following up on this before, and thanks for taking care of it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants