Tony S. Sykes wrote:

(i also made stupid typo's like "chmod +spermbackup.sh", but this
aside)

lmao



I'm wondering how many pitfalls there are that one should be very
cautious for and if one do falls in, how it can be restored.

The worst one I've ever done was what you did, but I did it worse because I was at /. (!)

So I lost the perms for the entire filesystem.  Fortunately I've never
been at root and done anything like rm -rf.  Knock on wood. :)

LX






I have, on a production server at work. With the unix guru sat on my shoulder and he let me su and then rm *.
You know,

I i wonder why these commands can be executed blindly
It's plain simple to drop the command in a seperate subfolder in the binfolder (outside the path environment) and replace the bin version for a script. It's also fairly to detect wether a person is currently on the root path and if he uses a global command and even if the command has to be executed recursively upon child-folders.


I'm currently not in the position to figure a bash or csh script from the back of my head (still learning!), but there can still be done nuff against fool-action.
As it may be well protected to against the big bad mean outside world, it's not as well protected from the dumb user itself.
Don't say "Don't use root account unless you know what you are doing" but catch critical events and make the user notice he / she might be executing a big mistake.


AKA (it's not a good script, but it gives the idea, i think someone else might be much better in translating what i mean)
if [ $(whoami) == 'root']; then
echo "You are going to execute this command as root in a dangerous way, sure to continue?";
echo "your action will affect all files on your Linux system\n and some components may not be working properly anymore\n after the action is done."
fi





____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to