Re:Systemd Rolling Out "run0" As sudo Alternative
by zeroimpl on Tuesday April 30, 2024 @07:50PM
(#40217883)
But sudo already doesn’t do that either. Eg sudo may ask for a password, and output some control sequences which hide the text so your password is not visible.
This feels like much ado about nothing.
Edit: Also don’t forget the “with great power comes great responsibility” blurb that sudo likes to output. I know that doesn’t happen in scripts when output is redirected, but I’m sure run0 will figure that out too.
Re:Systemd Rolling Out "run0" As sudo Alternative
by dijit on Tuesday April 30, 2024 @08:26PM
(#40218131)
asking for a password to do an authenticated action is about as far away from surprising as I can legitimately reason about.
The contextual blurb does have a way of disabling it in a persistent config, which is easy enough to set. It also goes to stderr and not stdout and does nothing to alter the output of the command itself.
It also does not show if you have NOPASSWD: set in your sudoers. So even less surprising.
Re:Systemd Rolling Out "run0" As sudo Alternative
by withinboredom on Wednesday May 01, 2024 @02:22AM
(#40220144)
> sudo may ask for a password, and output some control sequences which hide the text so your password is not visible.
You can turn this off for certain users and/or programs.
Re:Systemd Rolling Out "run0" As sudo Alternative
by 10000truths on Tuesday April 30, 2024 @07:03PM
(#40217545)
Any sane command line program will only output color codes if isatty(STDOUT_FILENO) succeeds.
Re:Systemd Rolling Out "run0" As sudo Alternative
by withinboredom on Tuesday April 30, 2024 @07:11PM
(#40217597)
That can succeed in a number of cases, where it actually isn't a tty with a user on the other end of it. There are a number of internal tools at work that only output logging if there is a tty and thus are run in their cronjobs with a tty. If there were unexpected color outputs in the logs, that would suck since the log aggregators probably wouldn't know what to do with it.
I'll give them the benefit of the doubt and assume they only do this if $TERM supports color. But still. That $TERM variable can surprise a poor programmer in all sorts of ways.