Why do all the sudo? [was Re: Software updater no longer functional]
Ralf Mardorf
silver.bullet at zoho.com
Wed Jan 25 12:55:23 UTC 2017
On Wed, 2017-01-25 at 13:46 +0100, Ralf Mardorf wrote:
> On Wed, 25 Jan 2017 13:40:40 +0100, Ralf Mardorf wrote:
> > On Wed, 25 Jan 2017 08:31:14 +0100, iceblink wrote:
> > > On 2017-01-23 18:57, Ralf Mardorf wrote:
> > > > > On 23 Jan 2017, at 11:16, iceblink <iceblink at seti.nl> wrote:
> > > >
> > > >
> > > > >
> > > >
> > > >
> > > > > he typed "rm -rf /", typo, "TAB", something, "ENTER".
> > > >
> > > > And what is different, if somebody makes this typo using "sudo"? The
> > > > same accident would happen. 1. Don't be root to delete something
> > > > that doesn't require root privileges. 2. Don't use -rf, use -Ir.
> > > > The same accident would happen when using sudo -i as well as when
> > > > using sudo.
> > >
> > > The difference is that you are asked for a password, and have 2
> > > seconds to process in your brain what just happened. Those 2 seconds
> > > make a world of difference if you have an Oops!-moment like the one I
> > > described...
> >
> > That's nonsense!
> >
> > You would make the typo after "sudo" or after "sudo -i", so you gain no
> > time at all.
> >
> > You won't type
> >
> > rm -rf / typo sudo
> >
> > you would type
> >
> > sudo rm -rf / typo
> >
> > and a typo becomes more likely if you type
> >
> > sudo foo
> > sudo bar
> > sudo n
> >
> > then when just typing
> >
> > sudo -i
> > foo
> > bar
> > n
> >
> > because of the repeated sudo and the way the human brain works.
> >
> > Apart from this I wonder how slow you guess that people type their
> > commands.
> >
> > It doesn't take 2 seconds to type sudo and nobody types sudo and then
> > takes a rest of 2 seconds to reread the typed command several times.
>
> Let alone that a default Ubuntu doesn't ask for the password each time
> you use sudo. Maybe you reconfigured sudo or you are using an alias, so
> perhaps your sudo actually is "sudo -k" ;).
The "-k" option would be the only way to _gain_ or better _waste_ time,
when using sudo for each command.
More information about the ubuntu-users
mailing list