Skip to content

Add authctl user set-shell command#1165

Draft
adombeck wants to merge 9 commits intomainfrom
939-set-shell
Draft

Add authctl user set-shell command#1165
adombeck wants to merge 9 commits intomainfrom
939-set-shell

Conversation

@adombeck
Copy link
Contributor

@adombeck adombeck commented Dec 15, 2025

Important

This is based on #1087, please review and merge that first.

Allow users to change their shell.

Closes #939
UDENG-7089

@adombeck adombeck force-pushed the 939-set-shell branch 2 times, most recently from eb3fed6 to dfb2353 Compare December 17, 2025 11:35
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 63.65462% with 181 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.08%. Comparing base (6ff09d2) to head (dfb2353).

Files with missing lines Patch % Lines
internal/users/proc/proc.go 60.41% 38 Missing ⚠️
cmd/authctl/internal/completion/completion.go 0.00% 29 Missing ⚠️
internal/users/db/update.go 70.96% 27 Missing ⚠️
cmd/authctl/user/set-uid.go 0.00% 19 Missing ⚠️
cmd/authctl/group/set-gid.go 0.00% 16 Missing ⚠️
cmd/authctl/user/set-shell.go 0.00% 14 Missing ⚠️
internal/services/user/user.go 70.58% 10 Missing ⚠️
internal/services/permissions/permissions.go 66.66% 7 Missing ⚠️
internal/testlog/testlog.go 61.11% 7 Missing ⚠️
internal/users/manager.go 95.00% 6 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1165      +/-   ##
==========================================
- Coverage   87.64%   86.08%   -1.56%     
==========================================
  Files          90       97       +7     
  Lines        6222     6682     +460     
  Branches      111      111              
==========================================
+ Hits         5453     5752     +299     
- Misses        713      874     +161     
  Partials       56       56              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adombeck adombeck marked this pull request as ready for review December 17, 2025 12:29
@adombeck adombeck requested a review from a team as a code owner December 17, 2025 12:29
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we also check if the shell is allowed in /etc/shells?

Copy link
Contributor Author

@adombeck adombeck Feb 18, 2026

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.

systemd-homed does a few other checks though, which I'll also implement:

done

@adombeck adombeck marked this pull request as draft February 18, 2026 14:15
@adombeck adombeck force-pushed the 939-set-shell branch 2 times, most recently from 4380115 to e564efe Compare February 18, 2026 14:49
@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 70.00000% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.49%. Comparing base (1b9ea6b) to head (455feb4).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
cmd/authctl/user/set-shell.go 0.00% 14 Missing ⚠️
internal/services/permissions/permissions.go 66.66% 7 Missing ⚠️
internal/services/user/user.go 66.66% 4 Missing ⚠️
internal/users/db/update.go 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1165      +/-   ##
==========================================
+ Coverage   85.00%   85.49%   +0.49%     
==========================================
  Files         119      101      -18     
  Lines        7669     6770     -899     
  Branches      111      111              
==========================================
- Hits         6519     5788     -731     
+ Misses       1094      926     -168     
  Partials       56       56              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Support changing the user's shell via authctl

3 participants

Comments