Skip to content

Add support for setting minimum UID for users defined via basic_users#942

Merged
sjpb merged 12 commits into
mainfrom
feat/basic_user_uid
May 14, 2026
Merged

Add support for setting minimum UID for users defined via basic_users#942
sjpb merged 12 commits into
mainfrom
feat/basic_user_uid

Conversation

@sjpb
Copy link
Copy Markdown
Collaborator

@sjpb sjpb commented Apr 7, 2026

Adds a variable basic_users_uid_min to the basic_users role, and checks that the UIDs specified for normal (i.e. non-system) users are above this. This makes it harder to accidently mix interactive users defined via the role in with the autogenerated UIDs for users installed for services etc.

Note that testing showed setting UID_MIN in /etc/login.defs did not prevent users being created with incorrect UIDs - it simply prints a warning. Hence this is implemented as an assert.

Requires image build as role copied into basic_users.

@sjpb sjpb marked this pull request as ready for review April 7, 2026 12:15
@sjpb sjpb requested a review from a team as a code owner April 7, 2026 12:15
Base automatically changed from fix-upstream/basic-users-skeleton to main April 9, 2026 12:41
@sjpb
Copy link
Copy Markdown
Collaborator Author

sjpb commented May 12, 2026

@sjpb
Copy link
Copy Markdown
Collaborator Author

sjpb commented May 12, 2026

Above image build failing repeatedly on RL8 for openhpc.

edit: ok launched builder manually, hits

[root@slurm-rl8-test-260512-1329-397bd574 rocky]# dnf list gcc
OpenHPC 52 B/s | 50 B 00:00
Errors during downloading metadata for repository 'OpenHPC':

But:

$ curl https://$ARKUSER:$ARKPW@ark.stackhpc.com/pulp/content/OpenHPC/2/EL_8/20241218T154614/repodata/repomd.xml
302: Found

So have we lost auth?? Yes we have:

[root@slurm-rl8-test-260512-1329-397bd574 rocky]# grep password /etc/yum.repos.d/OpenHPC.repo 
password = 
password = 

edit: not a fair test, local environment not set up to inject ark creds - will have to launch a CI build with no cleanup

Comment thread ansible/roles/basic_users/defaults/main.yml Outdated
@sjpb
Copy link
Copy Markdown
Collaborator Author

sjpb commented May 12, 2026

image builds https://github.com/stackhpc/ansible-slurm-appliance/actions/runs/25739548617 - should not get cleaned up on failure

Turns out it was an infra problem, new Ark certs didn't have an intermediary which RL8 required. Fixed.

@sjpb
Copy link
Copy Markdown
Collaborator Author

sjpb commented May 13, 2026

Copy link
Copy Markdown
Contributor

@wtripp180901 wtripp180901 left a comment

Choose a reason for hiding this comment

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

LGTM

@sjpb sjpb merged commit e32e60e into main May 14, 2026
34 checks passed
@sjpb sjpb deleted the feat/basic_user_uid branch May 14, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants