LXer: Should We Abolish User Access to rm?
Published at LXer:
Lately, I’ve been hearing system administrators and managers ask about solutions to keep people from accidentally removing their data. These are very smart and dedicated people asking for a solution so that data isn’t lost either by accident or on purpose. A wild idea I’ve heard to solve the problem is getting rid of user access to the rm command. Is this truly a crazy idea? Read More... |
First you have to decide who the data belongs to.
|
I don't think that a restriction access to rm would help. Some users are dumb enough to delete their data in the app that they are using and then save the file. This way, the data is also lost, without using rm.
Question: If I delete a file using a file-manager, is this file-manager using rm to delete it? |
Quote:
I think it's the extra confirmation that induces mistakes. I remember when I was using Window$ that there was always a confirmation, and sometimes I pressed the wrong button. It seems that removing the confirmation helps because: it makes you more careful, and it removes unnecessary confirmation. For root, I have made a wrapper script for rm that will prevent deleting top level directories and two levels down or so, plus no recursive. |
Are you sure you want to delete?
Yes Really certain? Yes Last chance. Are you sure you don't want to change your mind? Yes OK then, but don't come crying to me in a couple of days when you realise you've made a mistake. |
Quote:
Attachment 5980 Is this how Debian is by default? :scratch: If so it is just plain fscking stupid if you ask me! :banghead: |
Mmm, never come across that before. Maybe rm is aliased by default to rm -i.
Next time I boot into my debian, I'll try deleting something. |
Perhaps, but even the login shell wasn't to my liking until I put:
Code:
export PS1='\u@\h:\w\$ ' -edit You were right. I checked .bash_aliases: alias rm='rm -i' :doh: I'll just go ahead and change that now... :) |
Quote:
Quote:
|
I've got some weird kind of love/hate relationship with Debian. I keep installing it as a dual-boot with Slack, then getting fed up with it after a couple of weeks. This has happened a few times. :scratch:
|
Huh, well I just took out alias rm= 'rm -i', logged out and came back, and it still acts the same...
|
Are you sure you want to remove rm -i?
Really certain? etc etc etc |
Quote:
|
Quote:
However, if you delete all your work and ask the sysadmins to put it back, they may not take too kindly to you having removed their safety net... |
Ah well I don't have .bash_profile, and that file isn't even located in /usr/share/skel, just .bashrc where I copied to my home so I could at least change the way my login prompt is. I obviously can't modify /etc/profile but the alias for rm isn't even there anyways. Also I already removed alias rm= i from that file (.bash_aliases in my home).
Again I only assumed this is how Debian is by default, since all the aliases and .bashrc stuff is in some folder called /skel in /usr/share which is also something not found in Slackware. Oh well I guess I will just have to live with it. At least my prompt is in the proper manner. |
All times are GMT -5. The time now is 11:12 PM. |