On Wed, Mar 26, 2025 at 09:25:01AM +0700, Max Nikulin wrote:
> On 25/03/2025 19:47, J wrote:
> > Notice that the page suggests "# for i in /dev /dev/pts /proc "
> > so it is assumed that users should run
> >
> > $ sudo -i
> >
> > sudo *SH -c '...' -* as mentioned above. But it is not written in WIki.
>
> In my opinion, "sudo -i" might be added to the wiki articles. I would prefer
> to see a warning concerning compound shell commands in *sudo* docs.
>
> J, my impressions is that you read some docs strongly suggesting to prefix
> every command instead of just becoming root. It is reasonable recommendation
> in general case since sudo facilitates auditing and this practice encourages
> running most commands without elevated privileges. On the other hand system
> rescue using a live image is a special case. Logs are not saved by default.
> You need to run a bunch of commands requiring root privileges. It is more
> convenient to run "sudo -i" or "su -" once.
Indeed, redirections are another issue. I usually do this "prefix thing"
as you put it ("sudo this", "sudo that"), but have developed over the
years a feeling on when to "sudo -i". Alas, this is too difficult to put
in a wiki...
> If somebody is going to add a hint concerning sudo to wiki, please, make
> https://wiki.debian.org/RescueLive
> https://wiki.debian.org/GrubEFIReinstall
> https://wiki.debian.org/GrubEFIReinstallOnLUKS
> articles consistent (perhaps by including a fragment of some page to others
> using wiki macros).
Good idea. Perhaps weekend...
Cheers
--
t
Attachment:
signature.asc
Description: PGP signature