News for hackers. Stuff that matters.
Re:Ask HN: Your shell console "sanity prompts"? by mtmail on Sunday July 30, 2017 @08:18AM (#14885625)
I met a sysadmin who made a backup of all user home directories, then ran a script to delete (rm -rf) all data from users that haven't been logged in the last months. On that system the home directory of the user 'root' was /home causing all directories to be wiped.
Re:Ask HN: Your shell console "sanity prompts"? by levimaes on Sunday July 30, 2017 @09:09AM (#14885789)
This makes me want some kind of the OS X "System Integrity Protection", but for CentOS and Ubuntu. I mean there HAS to be something like this? Maybe this is what the substitute user is all about and I just kinda suck!
Re:Ask HN: Your shell console "sanity prompts"? by viraptor on Sunday July 30, 2017 @09:22AM (#14885838)
SELinux is likely a good solution for things like this. If your script should only delete home directories -> that's all it should be allowed to do.