Why do all the sudo? [was Re: Software updater no longer functional]

Karl Auer kauer at biplane.com.au
Mon Jan 23 11:08:23 UTC 2017


On Mon, 2017-01-23 at 10:38 +0000, Chris Green wrote:
> If you were to use synaptic to do the same job then it does exactly
> what I am suggesting, you become root for the duration of the job and
> exit when you've finished.

Not at all.

synaptic issues machine-generated commands that contain no typos. It
issues them for a specific purpose. It doesn't forget what it is doing,
do it in the wrong order or think it is doing something else. It
doesn't get distracted and forget to issue one of them. It double
checks that it is doing what you want it to do. It makes sure that
certain destructive sequences are avoided, or that extra confirmation
is sought first. It doesn't forget to relinquish its elevated
privileges when it's done.

Leaving all that aside and comparing only the two versions you
provided, sudo wouldn't help you much anyway as it would only ask for a
password on the first command, unless you let many minutes elapse
between commands. But that first command would remind you that you were
doing something potentially dangerous. After each command and at the
end of the sequence you would no longer be root. Issuing a command
without sudo would still fail if that command required root access.

The point the pro-sudo people are making is simply that if you have to
work on the command line, sudo is a safer default than just about
anything else. There are plenty of ways to do damage to your system,
with or without sudo.

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A
Old fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B






More information about the ubuntu-users mailing list