logo

skeud

Simple and portable utilities to deal with user accounts (su, login)git clone https://anongit.hacktivis.me/git/skeud.git/

suc.1 (1271B)


  1. .\" SPDX-FileCopyrightText: 2022 Haelwenn (lanodan) Monnier <contact+skeud@hacktivis.me>
  2. .\" SPDX-License-Identifier: MPL-2.0
  3. .Dd Nov 17, 2025
  4. .Dt SUC 1
  5. .Os
  6. .Sh NAME
  7. .Nm suc
  8. .Nd switch-user and chainload into a command / shell
  9. .Sh SYNOPSIS
  10. .Nm
  11. .Op Fl lp
  12. .Op Fl s Ar shell
  13. .Op Fl u Ar username
  14. .Op Ar command Op Ar argument...
  15. .Sh DESCRIPTION
  16. The
  17. .Nm
  18. utility switches into another user (root if
  19. .Fl u
  20. is unspecified) and then executes
  21. .Ar command ,
  22. or if unspecified, fallbacks to the user's shell.
  23. .Ss OPTIONS
  24. .Bl -tag -width __
  25. .It Fl l
  26. Make the fallback shell a login shell via prefixing it's basename
  27. passed to argv0 with a dash.
  28. .It Fl p
  29. Preserve environment.
  30. .It Fl u Ar username
  31. Switch to
  32. .Ar username
  33. .It Fl s Ar shell
  34. Use
  35. .Ar shell
  36. as the target shell, only allowed when root is the user launching the
  37. .Nm
  38. utility.
  39. .El
  40. .Sh EXIT STATUS
  41. If
  42. .Ar command
  43. or fallback shell is invoked, the exit status of
  44. .Nm
  45. shall be their exit status.
  46. Otherwise, the
  47. .Nm
  48. utility shall exit with one of the following values:
  49. .Bl -tag -width Ds
  50. .It 1
  51. An error occured or the authentication failed
  52. .It 126
  53. User's shell was found but couldn't be invoked.
  54. .It 127
  55. User's shell wasn't found.
  56. .El
  57. .Sh STANDARDS
  58. N/A
  59. .Sh AUTHORS
  60. .An Haelwenn (lanodan) Monnier Aq Mt contact+skeud@hacktivis.me