Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 13963 ideas, 66846 comments, 1291785 votes

Idea #6765: Protect the core system packages in APT



up
159
down
Written by Auzy the 10 Apr 08 at 07:33. Category: System.
Related to: Nothing/Others. Status: New
Description
There is nothing stopping us as users from deleting core system packages such as grub accidentally. I could tell any ubuntu user to do it, and they may wreck their system.

We should make APT smarter.
* There should be at least 1 kernel for instance, and it should be in the boot manager.
* If grub is the active bootmanager, make sure they know their system wont boot on deletion.
* You delete Xorg-X11, and you'll be hanging in prompt.

We need to make it more foolproof, and have a infrastructure in place to warn users if they are making a potentially fatal mistake.

Every second comment here is "well, it should be in apt". Well, if we want people to use apt for everything and be actively using it, we need to make it safer. I cant uninstall windows from their add/remove programs for instance now can I? Yet, one wrong click in adept will totally kill kubuntu.

Please note: THIS SHOULD BE ADDED AS AN OPTION! By default it should be enabled, except make it easily disabled so everyone wins
Tags: (none)

Attachments
No attachments.


Duplicates


Comments
tomaszx wrote on the 10 Apr 08 at 08:32
yes and should be a possible to force remove packages like apt-get --im-sure remove grub

XVIIarcano wrote on the 10 Apr 08 at 09:50
a) inncocent real fools don't even get to use synaptic but stick with add/remove wich is safe and clean, and if they copypaste if from some moron on the web they would copypaste --im-sure as easily

b) psychotic masochistic fools with root privileges won't be stopped by such a workaround

c) for non fools is just useless.

nitro182 wrote on the 10 Apr 08 at 09:50
I totally agree. I agree also with tomaszx: there must be a "force" option. I think that in these critical cases, a message with an audio-allarm is a "must" for a "human" Linux-distro like Ubuntu.
We HAVE to promote this idea :D. It's important and is also relatively simple to implement (I assume).

Sorry for my (I think) bad english.

Auzy wrote on the 10 Apr 08 at 11:41
Thats why I said, as a warning

We shouldn't stop users from doing it entirely.. But we have to at least warn them.

I know, because I deleted one dependency today of KDE (xine), and there was no warning whatsoever. I should have gotten a warning that KDE would disappear with it

Auzy wrote on the 10 Apr 08 at 11:51
Btw, I might be wrong, but I didn't think add/remove has everything in the repo.

People here keep saying "use the repo, windows installers suck". Which means they need access to all the repo for install, but we gotta make sure they dont do stupid stuff..

martin.marcher wrote on the 10 Apr 08 at 13:25
No, don't do that.

I have a couple of systems that DON'T have a bootloader or kernel and for a reason.

People that follow your free advice unconditionally will not be protected by that, after all you could still tell them to "aptitude purge --yes-i-know-what-im-doing libc" so how does that make any difference?

Warbo wrote on the 10 Apr 08 at 14:02
Using a sufficiently clear option name would solve the copy/paste problem for the most part.

If someone copies "apt-get remove libc" it isn't easy to tell it is bad, but running "apt-get remove --this-will-break-my-computer libc" would certainly make many people think twice, but still let super-admin types carry out whatever they want.

Auzy wrote on the 10 Apr 08 at 14:05
Noobs shouldn't be in the terminal anyway. But if you hand people a gui, tell them to install all software that way, and make it possible to uninstall the whole tree with one request for an uninstall(which I know is possible because I deleted xine and it killed KDE4 too without warning me that it was a dependency and would automatically wipe it), then its like you want users to fail. In fact, how bloody hard is it to have a checkbox you tick to block changes being made which could kill the system, that advanced users can uncheck.


Here, I got a better idea. Lets tell users to not install anything unless its in add/remove programs, or send them to windows instead. Because no f'ing way I'm recommending an OS to mates, where your primary means of installing offers NO safeguards.

We should really just hand newbies a grenade with the pin taken out, and do what we do now and tell them not to drop it instead of putting the pin in. That way if they accidentally trip, its an epic fail.

mynyml wrote on the 10 Apr 08 at 14:16
One subtle but important difference I've always noticed with *nix is it doesn't treat you like a moron. I strongly agree with XVIIarcano and martin.marcher; users can paste the --i-know-what-im-doing type option just as easily. It's no different in fact than someone copy pasting "sudo rm -rf slash" in a terminal.

Actually, seems to me that the option you're looking for is the "sudo" command. And if a user wants to go in synaptic and deselect packages they don't know about, then I say good for them, they're experimenting, and ubuntu allows them to do that. And that's great.

The best counter mesure I see against this being damaging is modding up idea #5390 "Offer to create a separate /home partition and use existing ones". Then if the system is damaged by a user experimenting, the reinstall will be painless.

Auzy wrote on the 10 Apr 08 at 15:53
Ok, well how do you explain that I'm a long term user, and by deleting libxine today, without even a prompt telling me that APT decided to automatically uninstall most of KDE4 too, it mowed down 224mb of packages of it. And I know what libxine does.

At the very least, Adept breaks all common sense, it does stuff it should warn about. If packages depend on something u are deleting, tell the user they will be removed too. Dunno about synaptic if it does the same.


I'll put this briefly.
A) You propose that you just lock newbies out of their system to protect them. I know what the sudo command is. So you reckon that if I install this on my grandparents computer, I shouldn't give them admin access. Gee, they will love that. Having to wait for me to visit just to update their programs. Nice one.

B) You also reckon, its more likely someone will copy and paste "apt-get remove linux-kernel" then accidentally right click the wrong file in a gui and press request removal. Ya, maybe you been hanging out on IRC too long. Contrary to belief, most users don't go around posting random commands. furthermore, you'll be hard pressed to find bad commands online that are apt related that uninstalls important things .

d) Your proposing we take a passive approach. Let them totally f*** their systems. But when they do, make it possible to repair. Make them sweat a bit I'd say. Users love it when their computers don't boot.


This is nothing like copying and pasting a command. Honestly! Its about having a good active defence. The logic I'm seeing here can only be compared to saying people can should run untrusted programs in their emails, and rely on anti-virus to fix it.

I shouldn't have to be arguing this idea against "oh, but they can still type commands in terminal". Heres a bright idea.. Warn people in terminal that they should only do things if they truly understand it. Then we cover both sides.

So in other words mynyml and martin. You propose we don't try to fix the problem AT ALL! Is that correct? Because you do realise the gui programs use apt as the backend right. To do this properly though, apt needs to support it.

Sidney wrote on the 10 Apr 08 at 17:33
I'm not sure how you could kill most of your KDE by just removing libxine. Whenever I uninstall something in Synaptic, it pops up a warning what else will be removed then. Apt-get does the same. So, it clearly _does_ warn me if I try to f*ck up my system, and it still lets me do that. And in Add/Remove, I don't even find the kernel or any system-relevant packages.

At most, there should be a warning by that, but you can't propose that some packages can't be uninstalled. I'm root, why should apt know better than me what I want on my PC? Linux treats the user (especially root) as if he knew what he was doing. Windows assumes the user doesn't know what he wants, and thus you can't really customize anything.
We should _not_ we sacrifice this power to do with you PC what you want, just so that some users don't mess it up on their own account. It's their responsibility, not the distros to know what they are doing.

sf_007 wrote on the 10 Apr 08 at 18:48
I agree with this idea, and Auzy seems to have made a very good point...

steve196 wrote on the 10 Apr 08 at 21:37
Nope. I like it best as it is:
The root user or sudoer should operate without any restrictions.
I cannot imagine a way how an inexperienced user can remove something essential, while really wanting to do something else. Accidentally giving exactly the wrong arguments is like winning lottery millions.
BTW a half-expert user can fix the damage done by accidental removal of software even if the system does not start anymore. So they have to call their junior and everything is fine again.

By the same logic you would have to ban users from using sudo cat or sudo dd, because those in combination with the exactly wrong arguments can cause true disasters.


Auzy wrote on the 10 Apr 08 at 23:58
Steve. Read my last FULL post, you obviously have just skimmed. If you don't read all the facts, dont vote. Your whole argument revolves around things I have addressed. And its word for word a copy of what people said before.

And like I said, it should still be possible to unlock the packages.

Its not a lottery ticket, Even sidney just said he was surprised it happened when I got rid of one of the libxine, but it did! And believe me, I've been using various linux distro's for 6 years now at least.

I hope you guys aren't in charge of weapon design, because you seem to treat mistakes like a perfectly ok way to live life. Doesn't matter if there are a few fatalities along the way. I guarentee, Ubuntu has NO chance going mainstream with that attitude.


Yes, there are thousands of commands to destroy a system. Same on windows. But ffs, Terminal is for advanced users. GUI is for beginners. Except in our case, where people are trying to treat them the same (but they aren't). cmd in windows can trash a system. yet, how often do users copy commands into it? NEVER!


Ralf.Nieuwenhuijsen wrote on the 11 Apr 08 at 00:50
I would prefer to just hide synaptics in the menu by default.

Problem solved.

>if we want people to use apt for everything and be actively using it, we need to make it safer

Who wants people to use apt. Hands off. Use add/remove.
Apt is for system maintainers. Normal user's should fiddle with that.


Auzy wrote on the 11 Apr 08 at 01:33
Ok, I have a seperate idea where everyone wins instead. That is less controversial.. http://brainstorm.ubuntu.com/idea/6816/

Auzy wrote on the 11 Apr 08 at 07:26
APT is the back end Ralf, yes they shouldn't be touching apt, but they should be able to safely use synaptics or adept

maxpower89 wrote on the 11 Apr 08 at 09:47
I voted negative because:

- I don't like my OS decides for me what i can do and what not, like windows do
- If you have to do a sudo or fill in your password you should know this you could make a fatal mistake..


The reason i like linux is because if i want to delete my kernals, just because it can.. there is nowone who say: NO YOU DONT!

Auzy wrote on the 12 Apr 08 at 03:09
Once again max, have you read what I wrote. I wrote implement as AN OPTION!

Then it only takes seconds to disable

nevermind85 wrote on the 29 May 08 at 04:58
Synaptic does tell you if what you're marking to remove has dependencies that will also be removed. And I think i have came across some warnings when I tried to remove all kernels in my systems. A similar warning was shown once by apt when it tried to remove around 500 base packages, it said that my system would become unusable.

Try this on a command line "sudo apt-get remove linux-*". It' comes with a huge warning message asking for a huge confirmation:

Warning: This will eliminate the following essential packages.
DO NOT continue unless you know exactly what you're doing!
base-files libpam-modules (base-files) bash debianutils (bash)
GNU core utilities libselinux1 (GNU core utilities) dash dpkg e2fsprogs libblkid1 (e2fsprogs) libuuid1 (e2fsprogs) gzip login mount python-minimal sysvutils util-linux
Updated 0, 0 will be installed, 714 to remove and 0 not updated.
1995MB will be freed after unpacking.
You're about to do something potentially harmful
To continue write the phrase 'Yes, do what I say!'
?]


So I think this exists already, but can't speak for Adept since I use Gnome.

andruk wrote on the 6 Jul 08 at 08:04
nevermind85: I wonder if you are attempting to illustrate a point here. Here I am, thinking that I should run that command to see what happens and then vote based on that. But, what if it really doesn't do what you say it does? Then I am _hosed_, as I'm on a school-owned tablet PC with no CD drive, no boot-from-USB support, and little recompense if I do end up killing my machine.

Auzy's point is that newbies shouldn't be using the command line, but for those few that aren't intimidated by it, they have the potential to seriously f*** up their computer before they learn what certain commands do. I would know, as that's exactly what I did back when I was using Debian (shudder). Yes, I know I was an idiot, and I should not have been fooling around with something I didn't understand, and I am not worthy to touch the supreme shininess that is Linux, and that I should go back to W****** (twitch), but how else are people supposed to just know what commands are bad before they use them? The lovely people on the Debian IRC channel were incredibly unhelpful to the newbie me (granted, Ubuntu forums and IRC are much better).

I have said it before, and I will say it again: Proper protections should be in place for recent converts, but these protections should be easily disabled by power users and administrators. Auzy's idea minimally inconveniences power users, and provides an immense protection for newbies. Sometimes we cannot simply assume that the admin knows what he or she is doing.

So, what is more important to you: running Linux on your high horse or getting Linux used by the masses?

+1, Helpful for converts

nevermind85 wrote on the 8 Jul 08 at 20:09
@andruk: What I've posted is nothing but a copy-paste from the terminal. Try it, you can always press Ctrl+C really quick.;)

Now seriuosly, I haven't vote for this idea yet, since I really don't know if that's the default behavior for all apt variants out there. apt-get currently DOES give you the warning I've posted up there. on Synaptic, you DO get a pop-up with all the packages that are going to be removed; if you try to remove all kernels, it DOES give you another warning as well. What else do you need?

Again, I don't know about Adept... all the other package managers I use are smart enough as to know you're dumb enough.


Post your comment