Why echo 'password' | sudo -S sudo -s does not work whereas echo 'password' | sudo -S mount -a works?
Robert Heller
heller at deepsoft.com
Mon Feb 8 14:48:53 UTC 2021
At Mon, 8 Feb 2021 15:02:08 +0100 "Ubuntu user technical support, not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:
>
> Content-Type: text/plain
>
> On Mon, 8 Feb 2021 08:23:35 -0500 (EST), Robert Heller wrote:
> >Even better, just run the whole srcipt with sudo
>
> While it could be better, it also could be even more worse than even
> the echo password approach, since it is asking for privilege escalation
> depending on what the script does, for example when sometimes accessing
> the Internet.
One really should look at the script before *blindly* running it with sudo.
OTOH, if it is a self-written convience script (like the example I showed), it
could be a valid option.
>
> However, I agree that the echo password approach is bad, but I
> refrained from acting as a teacher, since it's not that seldom, that
> software doesn't behave much better and the question wasn't about
> security. While it's frowned upon, some apps require plain passwords in
> human readable config files and just recommend to use very restricted
> file privileges. Don't ask me for examples. I've seen a few apps doing
> this, IIRC command line mail clients. I don't tend to follow this
> attitude.
>
--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller at deepsoft.com -- Webhosting Services
More information about the ubuntu-users
mailing list