-2

I'm using Kali Linux and I want to start with sudo privileges every time I run the terminal using CTRL+ALT+T.

I tried this solution but it's not working:

is-there-a-way-to-stop-having-to-write-sudo-for-every-little-thing-in-linux

Is there a way to do it ?

Thanks in advance.

  • Obviously there is a way to do it: The question you reference has several solutions. You can't expect the other users to read through all that, and if anybody answers here, there is a good chance that the answer doesn't work for you. To enable people to help you, state which solutions you tried, and how they failed. "not working" is not a problem description. A problem is described as follows: (1) which steps did you take (2) what did you expect to happen (3) what unexpected results did you get. – berndbausch May 30 '21 at 02:48
  • Are you the sole person using your computer and do you mind if your password is in plain, readable text? –  May 30 '21 at 03:23

3 Answers3

1

There isn't really such a thing as "sudo privileges". There are root privileges, which the sudo command can grant. Or you could log in as root directly, but this isn't generally recommended.

Chris Davies
  • 116,213
  • 16
  • 160
  • 287
-1

If you do not want to type your password every time you type sudo, you can edit sudoers file by running sudo visudo then making sure the line razimbres ALL=(ALL) NOPASSWD:ALL is present.

If you absolutely do not want to type sudo evry time (which is not recommanded because all your actions will have root privileges), you can add sudo su at the end of your .bashrc (or equivalent) file.

-2

echo "<username> ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/010_$user-nopasswd

n-e0
  • 1
  • Could you describe what this does exactly and how it solves the user's issue? Note that it appears as if you are giving the user the rights to execute any command with sudo without having to give a password. You should probably explain why you think this is an adequate measure. – Kusalananda May 31 '21 at 21:22
  • Since you appear to be relying on the $user variable being set, why not use it as part of the echo command itself? As-is, the answer is not copy-paste-able, since the literal <username> will not match any valid username. Additionally, $user is not guaranteed to contain the current username; perhaps you wanted $USER? – Jeff Schaller Jun 01 '21 at 01:24