Score:-5

Why Ubuntu still hasnt fixed deleted passwords issue?

ec flag

So after 6 years this question was posted I still ran into same issue. I did the followoing :

myusername ALL=(ALL) NOPASSWD:ALL

And it was going fine for some time so if I am installing any software like Zoom in Ubuntu from GUI then there it still asks for password while there is no password for the system! I could only install it using terminal sudo and then it did not ask for the password.

Today its asking for password again while I have none.

I cant do sudo visudo because there is no system password,what can i do to resolve this?

BiologyEnthusiast avatar
ec flag
@Rinzwind where what is normal? I am pertaining to the a simple fact that people have experienced the same thing, have to check the link i posted? I am not running docker anymore but something have had trigerred sudo back to asking for password.
Nmath avatar
ng flag
Ubuntu is not designed to be used without the administrator being behind a password. One of the great things about Linux is the wealth of choices. Maybe Ubuntu is not the right choice if this is how you want to interact with your device. IMO finding another person with the same question isn't relevant if the question itself is flawed. As mentioned, Ubuntu isn't designed to work this way. If you found someone asking why their toaster isn't good at making soup, it doesn't mean the toaster is broken.
BiologyEnthusiast avatar
ec flag
`Ubuntu is not designed to be used without the administrator being behind a password` so are you saying that an administrator/user "must" have a password as per the design philosophy of Ubuntu?
Nmath avatar
ng flag
I'm saying that Ubuntu is not designed that way. Ubuntu is open source, so you are free to do whatever you like with it, no matter how bizarre or counterintuitive it is to the design or intended purpose or functionality. But just because you can theoretically do anything/everything, it doesn't mean you should or that Ubuntu is the right tool for your use case. Related: [Why does Ubuntu have a disabled root account?](https://askubuntu.com/q/687249)
Score:0
in flag

This is still an issue in linux because linux doesn't prevent you from misconfiguring the system. This is not a bug in linux, it is a user error that created the problem.

The question you linked was about someone who deleted their password without adding the sudo configuration directive to allow passwordless sudo.

You have included the correct sudo configuration directive line in your question, but the GUI doesn't use sudo to install software, so you need to configure the GUI to allow software installation without a password for that to work.

Escalating privilege without a password is an unsafe configuration, and unlike other operating systems, is not encouraged or well supported in the default configuration of Ubuntu.

BiologyEnthusiast avatar
ec flag
This is the kind of answer I was expecting as i dont have much understanding of how the system authorization works. Now based on speculation only, can you suggest what could have trigerred terminal asking for sudo password from me again, eventhough it was removed a while back and terminal never asked me sudo password since then, its just two days back I installed docker along with some python packages and after restart sudo is asking for password again. Can docker in your knowledge altered sudoers file in any way?
BiologyEnthusiast avatar
ec flag
I ran the following: `sudo usermod -aG docker $USER` and `sudo groupadd docker ` It didnt ask me password when I did that, but after restart it is asking for it!
user10489 avatar
in flag
Right. Things that use sudo (which those two commands explicitly do) would not ask for a password. I would have to know what you ran that did ask for a password to answer your question. A lot of GUI programs use dbus services for privilege escalation, and resolving that is worth another question, and probably already has answers if you know what to search for.
user10489 avatar
in flag
Note also that by design sudo only asks for a password once in a particular terminal for a specific time interval. When that expires or if you go to another terminal (or presumably reboot), it would then ask again.
BiologyEnthusiast avatar
ec flag
I have a good understanding now. Thanks for that. To answer your question, after I ran those two commands I did a restart as I was getting issues regarding docker session. So after the restart "anything" with sudo now requires password. Im in a limbo where I cant even edit sudoes file as doing `sudo visudo` would require password, which I dont have. I also removed the password from the system as well.
user10489 avatar
in flag
There are other questions that can explain how to recover from this. Then you can investigate what happened to your sudo config.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.