On Mon, May 2, 2022 at 8:19 PM <to...@tuxteam.de> wrote: > On Mon, May 02, 2022 at 07:58:12PM +0200, Michael Lange wrote: > > On Mon, 2 May 2022 10:17:06 -0500 > > Richard Owlett <rowl...@cloud85.net> wrote: > > > I'm using Debian 10.7 with MATE DE [will be updated later this week] > > > The machine is a Lenovo T510 and is setup to login as either "richard" > > > or "root". > > > > > > If logged in as "richard" I can execute su {+ password} and receive a > > > prompt indicating I'm "root". > > > > > > However if I then enter "update-grub", the response is > > > "bash: update-grub: command not found" > > > as if I were the unprivileged user "richard". > > > > you need to do > > > > # su - > > > > (instead of just > > > > # su > > ), > > otherwise $PATH will be inherited from user "richard" and thus lack the > > entry "/sbin". > > Or just get used to say "/sbin/update-grub" ;-) > > (No, I'm not really being serious here. But half-acquiring this > habit would have helped you to unravel the problem like in "Ah, > I have the permissions but not the $PATH..."
On this note, I've always found it annoying that debian (and likely others) don't put /sbin in the normal user's $PATH. A lot of the tools there have uses other than modifying the system.