Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I know that but if I don't wanna change but still protect system, like any way to create an alias?@Fiftyseven
-
If you're not sharing machines, you could add ip restrictions, or set up/change ssh keys.
-
You could create a new user (with a different password), and revoke the sudo access for the current one.
The simplest way would still be to change your password, is that definitely not an option? -
Kimmax111067yIf he has physical access nothing can protect you. Boot init=/bin/bash and you're done
-
In your bash profile you are putting something like:
alias rm="echo" ?
You could install a trash package an alias as that instead, but I don't think that's what you want though you can undo deletes then. -
Have your work always in some repository like git, svn etc and then follow 3+2+1 backup rule. This use case is typical disaster management which covers another scenarios say your hard disk fried one day.
-
RAZERZ26797yAre you sure that you can't just
alias rm -rf='echo eat my shit'
And then . ~/.bashrc or source ~/.bashrc? -
I tried to change alias for rm, it didn't work, so I didn't test for rm -rf@RAZERZ
-
Move the rm binary somewhere else, and put a shell script in it's place. Check if the arguement is /, otherwise point it to the real rm. If it's actually rm -rf /, print out some insults. I don't recommend testing it though.
Good luck.
Related Rants
-
gururaju53*Now that's what I call a Hacker* MOTHER OF ALL AUTOMATIONS This seems a long post. but you will definitely ...
-
linuxxx65This guy at my last internship. A windows fanboy to the fucking max! He was saying how he'd never use anythi...
-
creedasaurus60Another dev on my team just got a new machine. Before he came in today I made two separate USB installers and ...
All linux users out there is there a way to protect from "rm -rf" scenario if your friend knows your linux password
undefined
linux