I want to enable root privileges permanently so that, for example, I never need to type sudo. I also want a blank password.
I found a thread addressing this with link Always Sudo Privileges. Exactly what I want to do is summarized as follows.
Run the commands below, and compare the outputs
sudo cat /etc/shadow sudo sed "s/\(^$(whoami):\)[^:]*/\1/" /etc/shadow
You should see that the latter has removed the gibberish in front of your username (which is read using
$(whoami)
). (If you don't, don't continue!)When you're ready, run the command to overwrite /etc/shadow (at your own risk!)
sudo sed "s/\(^$(whoami):\)[^:]*/\1/" /etc/shadow > /etc/shadow
Your account now has a blank password, and you should no longer be prompted for sudo permissions. (At least, that's what happened to me.)
The problem is that I get a permission denied on the command that actually changes /etc/shadow
. Changing ownership of the file first allows the command to execute, but then I do not seem to have a blank password. If I log out, I can't get back in, neither blank nor my original password are accepted.
Please help me understand why these directions are not working for me.
I have seen several questions like this in trying to resolve my issue, and they often devolve into a lecture on why some feel this is a bad idea. Please just help me figure this out without this thread going there. Without knowing my specific situation, no one on this thread can know that this is a bad idea.