0

I have a debian box, and after some version update or so, root commands are not recognized while being in the desktop environment; for instance dhclient or reboot.

At first, I took it as an additional security measure. But using gparted via an direct system access without desktop (eg using a Ctrl-Alt-F1 login) does not make much sense.

 $ uname -a Linux terbium 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux $ cat /etc/debian_version 11.2 $ su Password: # root@hostname:/home/user# dhclient # example bash: dhclient: command not found 

Is this documented behavior or just update error? or system error? Any idea where to start or how to solve this?

[edit: To make sure I explained right: some root commands work on desktop for instance apt, but others work only on the desktop-free shell, eg dhclient or reboot ; and gparted is in limbo ...]

6
  • 1
    /sbin is probably missing from $PATH Commented Mar 2, 2022 at 10:51
  • indeed, thx for the hint ! So how come it is missing and where or how to fix it? Commented Mar 2, 2022 at 10:56
  • Check your shells config and login files Commented Mar 2, 2022 at 14:16
  • If you do su -, you'll get root's environment -- the hyphen specifies a login shell. Commented Mar 2, 2022 at 15:45
  • @glennjackman thx ! I was just doing su ... So how come I do not have the same rights in this case? [edit] ok, it's documented in man su ... Commented Mar 3, 2022 at 9:06

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.