Disable rm -rf * or rm -rf / in Cent OS


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Disable rm -rf * or rm -rf / in Cent OS
# 15  
Old 07-29-2013
Quote:
Originally Posted by blackrageous
Why not just move the rm command and redefine it as a script then you can issue "please verify your command". Of course you will want to be careful, since now rm expects input in the case you're trying to exercise care. Anything that is scripted should run the old version of rm.
Such a fundamental modification would affect every user on the system, including startup scripts, shutdown scripts, and cronjobs, none of which have a controlling terminal with which to prompt and read a response.

I strongly suggest against even considering this suggestion.

Regards,
Alister

Last edited by alister; 07-29-2013 at 03:04 PM..
# 16  
Old 07-29-2013
It's done all the time and really the whole point behind having both a system level environment file and process level environments.
# 17  
Old 07-30-2013
Replacing core binaries with alternatives that prompt and require a response is "done all the time"?

I'll just walk away from that ludicrous statement now.

Bye.
# 18  
Old 07-30-2013
Quote:
Originally Posted by blackrageous
It's done all the time and really the whole point behind having both a system level environment file and process level environments.
"All the time"?!!?! Smilie

One wonders how on God's good Earth you upgrade or patch a system after you've done that.
# 19  
Old 07-30-2013
Some of the suggestions so far are possibly ok.

I propose a wholly new direction: psychology, not technology

Code:
1. The users do not know RH Linux (Centos), or you would not be here with this problem.
2. You can cause them to be a lot more careful with a vague threat.

I do not know how your users get to root, maybe su or sudo. Anyway, as part of root's login message or from the
Code:
sudo su - root

add a message:

Code:
"Warning: All actions regarding deletion of files using the rm command are being monitored."

Or whatever works in your environment.

Of course, you are monitoring nothing.

But users cannot know how to verify that easily. It is not bulletproof. But you cannot play with core utilities like rm and still have the system behave correctly.

I think you have a management problem. If management will not listen seriously to your problem, and enforce some changes, then you cannot possibly win.

But maybe you can fool enough people to get some stability.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Linux

Add persistent route in cent os 6.5

Hi , I have cent os 6.5 and am trying to make few routes permanent for bond: i have added two routes using below two commands : /sbin/route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.59.160.128 /sbin/route add -net 0.0.0.0 netmask 0.0.0.0 gw 49.44.52.90 post which route command output is... (5 Replies)
Discussion started by: omkar.jadhav
5 Replies

2. Red Hat

How to Find all the SSL certs on a give host Cent OS

Hi I am trying to find all the ssl certs installed/located on cent os Host , Please help . (1 Reply)
Discussion started by: smartguyz2012
1 Replies

3. Red Hat

AD Intergration with Cent OS 6

Hello, I am integration AD authentication to Cent OS 6 servers. I am running to this error when I tried to join with AD server. error message : # net ads join -U 504783 Host is not configured as a member server. Invalid configuration. Exiting.... Failed to join domain: This... (0 Replies)
Discussion started by: bobby320
0 Replies

4. Red Hat

SSL/TLS renegotiation DoS -how to disable? Is it advisable to disable?

Hi all Expertise, I have following issue to solve, SSL / TLS Renegotiation DoS (low) 222.225.12.13 Ease of Exploitation Moderate Port 443/tcp Family Miscellaneous Following is the problem description:------------------ Description The remote service encrypts traffic using TLS / SSL and... (2 Replies)
Discussion started by: manalisharmabe
2 Replies

5. Linux

UVFS in Cent OS

Hi, Trying to install Interwoven Teamsite in CentOs 5.4. Found issue in the first step while installing the uvfs . # gmake /usr/bin/gcc -g -O3 -Wall -I. -c -o uvfs_signal.o uvfs_signal.cc gcc: error trying to exec 'cc1plus': execvp: No such file or directory gmake: *** Error 1 # ... (2 Replies)
Discussion started by: rajarshiroy77
2 Replies

6. Shell Programming and Scripting

How to disable Enable/Disable Tab Key

Hi All, I have bash script, so what is sintax script in bash for Enable and Disable Tab Key. Thanks for your help.:( Thanks, Rico (1 Reply)
Discussion started by: carnegiex
1 Replies

7. Red Hat

Installation of Web Logic9.2 on Cent OS5

Hi, Trying to install web logic 9.2 on Cent OS in the Graphical mode. After accepting the license agreement the "Complete" installation is selected.The path for installing the components is mentioned and when clicked on "Next" it hangs and is not proceeding further. Any suggestion or... (0 Replies)
Discussion started by: rajp_8007
0 Replies

8. Linux

how to make a Cent OS package.

I am using Cent OS 5.1. It has a command "yum" to install or update new packeges from a mirror or repository. i am doing installation and configuration of Sun directory server and opensso. i have made a shell script to install and configure both. but now the need is to create a Cent OS packege,... (1 Reply)
Discussion started by: toanilsharma1
1 Replies

9. Shell Programming and Scripting

Chek if a file exists in Ubuntu and Cent OS using shell script

I have tried few examples in the internet but all of them are different and none worked. I need to check if a file exists in a directory if it does not then exit . here is what I have for now $filename ="/usr/local/net/var/lib/directoryservice/sync.disable" if ; then echo "The file exists"... (2 Replies)
Discussion started by: m_kk
2 Replies
Login or Register to Ask a Question