-1

on this siite >How do I edit the /etc/hosts file? i would ask my question but i dont have permission. strange, because now i have to open a new question, why ? thats was not the question.

i try to make a starter on my desktop wich opens a file with sudo, directly. in terminal it works like "sudo leafpad /etc/hosts" with a charme. but if i put the same command in a starter, nothing happens.

the target is with one click to put new hp in it.

why its ok in the terminal but not in the starter ???????? also not possibel to make a shortcut. why?

thanks for answers

1 Answers1

0

Not a solution but it should be a workaround

Open Terminal and open your FileManager using sudo Ex. sudo thunar &

The "&" at the end will allow the Terminal to continue to run and not be "locked" with the file managers process just in case we need to type another command.

Ok now that you have a File Manager running as root we can do some adding of files. Navigate to /etc/sudoers.d and create a document / plain text. Name the file your user name... for this example I will use orion for the user name. Ok now in the /etc/sudoers.d directory I have a file called orion. Click (double click or whatever) to open the file and enter the following:

%orion ALL=(ALL) NOPASSWD: ALL

save the file and that should be it. You will no longer need a password in terminal when using sudo and you will now be able to create that "shortcut" using sudo leafpad /etc/hosts

I will say that this will make your system less secure and not something that should be done on a "public machine" but I'm lazy and hate typing my password all the time :)

John Orion
  • 2,871