11-08-2005
Protect from rm /
We recently had an accidental delete from /. I hold the root password but others are allowed to sudo over to root to perform admin tasks. The only way I want to permit deletion from / is by physically being root (su -).
I'd like to add a line to the sudoers file which would permit all commands except rm from the / directory.
Could I use something like the following?
OPS ALL = !/usr/bin/rm / *,!/usr/bin/rm /usr *,!/usr/bin/rm /opt *
Thanks.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
we have an hp-ux and a user requested me if i can password protect the dtterm. i know that this is possible but can you give me some hints in making this happen?
thanks :cool: (2 Replies)
Discussion started by: inquirer
2 Replies
2. UNIX for Dummies Questions & Answers
I have created a PHP page that I use to clean files on my machine. I would like to leave the file there but I want to password protect it so that I am the only one that can run it from the shell. Does anyone know how to do this? Thanks.
-Cam (2 Replies)
Discussion started by: perryl7
2 Replies
3. UNIX for Dummies Questions & Answers
Hello,
Can someone give me some recommendations on how to protect this account? I understand that this account is an "operator" account and has root access.
Thanks in advance (5 Replies)
Discussion started by: susie2345
5 Replies
4. Cybersecurity
Hi!
Looking for some feed back on this tutorial...
Thank you for checking out this thread.
I'm working on some killer videos right now that will explain in detail how you can protect your website against hackers. The first part of the video series is live right now and it covers Cross-Site... (2 Replies)
Discussion started by: Arne1983
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a process which takes 13-15 mins for execution and its getting killed in the meantime.So can you please helpme out how to protect the process from getting killed.
Thanks in advance.
Regards,
Harika (9 Replies)
Discussion started by: harikagrp
9 Replies
6. UNIX for Advanced & Expert Users
how to protect my process from others to kill??
Double post, continued here, thread closed (0 Replies)
Discussion started by: samrintu
0 Replies
7. UNIX for Dummies Questions & Answers
Afternoon,
the stat command is used against a file to ascertain date created and last modification time. However a different individual if they so chose could use the touch command to alter the date created or modification time.
Is there anyway to protect against this ?
thanks
Steve (2 Replies)
Discussion started by: sevans29
2 Replies
8. Cybersecurity
Hello there,
I would like to protect a Linux system from cloning, I don't mind if the cloned hard drive works in the same computer, but I need to avoid it to work in other one, even if it uses exactly same mainboard model and rest of computer parts. I want the cloned system to get frozen or... (4 Replies)
Discussion started by: Installimat
4 Replies
9. Shell Programming and Scripting
Is there a way to have a user be prompted for a password to open a file? I am trying to protect a bash script from being changed. Thank you :). (3 Replies)
Discussion started by: cmccabe
3 Replies
shells(4) File Formats shells(4)
NAME
shells - shell database
SYNOPSIS
/etc/shells
DESCRIPTION
The shells file contains a list of the shells on the system. Applications use this file to determine whether a shell is valid. See getuser-
shell(3C). For each shell a single line should be present, consisting of the shell's path, relative to root.
A hash mark (#) indicates the beginning of a comment; subsequent characters up to the end of the line are not interpreted by the routines
which search the file. Blank lines are also ignored.
The following default shells are used by utilities: /bin/bash, /bin/csh, /bin/jsh, /bin/ksh, /bin/pfcsh, /bin/pfksh, /bin/pfsh, /bin/sh,
/bin/tcsh, /bin/zsh, /sbin/jsh, /sbin/sh, /usr/bin/bash, /usr/bin/csh, /usr/bin/jsh, /usr/bin/ksh, /usr/bin/pfcsh, /usr/bin/pfksh,
/usr/bin/pfsh, and /usr/bin/sh, /usr/bin/tcsh, /usr/bin/zsh. Note that /etc/shells overrides the default list.
Invalid shells in /etc/shells may cause unexpected behavior (such as being unable to log in by way of ftp(1)).
FILES
/etc/shells lists shells on system
SEE ALSO
vipw(1B), ftpd(1M), sendmail(1M), getusershell(3C), aliases(4)
SunOS 5.10 4 Jun 2001 shells(4)