+11
−7
+46
−8
Loading
"su jan -c id" failed with "su: user id does not exist": su knew no
-c and took every word as the user name, the last one winning. Now
-c COMMAND / --command=COMMAND runs "SHELL -c COMMAND" as the user
(before or after the user name), -h/--help shows the usage, and an
unknown option, a missing command or a second user name is an error
instead of a user name.
The fresh builtin ran su right in the shell for root, so the switched
user's shell replaced root's (and "su USER -c ..." ended a root
script); it now always runs su in a child the shell waits for.
Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>