2

As mentioned in this question, the sudo command in my live USB is not working. To fix this I need to run some commands. But every command I run says permission denied. How do I gain root access? Running su - asks for password.

Yashbhatt
  • 167

1 Answers1

3

As only the sudo command is not working because of a badly configured /etc/sudoers file, you can use pkexec as temporary replacement:

pkexec su -

pkexec will prompt a GUI password dialog every time you run it, it seems not to work in a TTY or when booting to text mode as it needs a dbus component.

You definitely need to fix your /etc/sudoers file, becoming lazy and just using pkexec from now on is not the way to go. That's not what it's made for.

Byte Commander
  • 107,489