suc.1 (1271B)
- .\" SPDX-FileCopyrightText: 2022 Haelwenn (lanodan) Monnier <contact+skeud@hacktivis.me>
- .\" SPDX-License-Identifier: MPL-2.0
- .Dd Nov 17, 2025
- .Dt SUC 1
- .Os
- .Sh NAME
- .Nm suc
- .Nd switch-user and chainload into a command / shell
- .Sh SYNOPSIS
- .Nm
- .Op Fl lp
- .Op Fl s Ar shell
- .Op Fl u Ar username
- .Op Ar command Op Ar argument...
- .Sh DESCRIPTION
- The
- .Nm
- utility switches into another user (root if
- .Fl u
- is unspecified) and then executes
- .Ar command ,
- or if unspecified, fallbacks to the user's shell.
- .Ss OPTIONS
- .Bl -tag -width __
- .It Fl l
- Make the fallback shell a login shell via prefixing it's basename
- passed to argv0 with a dash.
- .It Fl p
- Preserve environment.
- .It Fl u Ar username
- Switch to
- .Ar username
- .It Fl s Ar shell
- Use
- .Ar shell
- as the target shell, only allowed when root is the user launching the
- .Nm
- utility.
- .El
- .Sh EXIT STATUS
- If
- .Ar command
- or fallback shell is invoked, the exit status of
- .Nm
- shall be their exit status.
- Otherwise, the
- .Nm
- utility shall exit with one of the following values:
- .Bl -tag -width Ds
- .It 1
- An error occured or the authentication failed
- .It 126
- User's shell was found but couldn't be invoked.
- .It 127
- User's shell wasn't found.
- .El
- .Sh STANDARDS
- N/A
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact+skeud@hacktivis.me