Thanks Rudic,Ravinder Singh,rabattel,Don Cragun for enlightening me.
as i got the requirement to suppress -rf option for rm command to database user
i don't have sudo or root access so i chosen this way with my limited knowledge.
Thanks once again all for sharing your thoughts.
IN general, doing what you want ,without creating a chroot jail for that one user, will fail or break existing code for everybody else.
You need to consider - assuming you are on a open source like linux or freeBSD:
1. change the rm source to stop printing, compile it to another directory
2. put the one user in a chroot jail, where the special rm and the rest of /bin /usr/bin and maybe /usr/sbin are in a separate safe location for that user. Only.
<..>
Also Someone please advice me above process is ok or not
Aliasing a rm function to ls is not something i consider "avoid unrequired deletions". ls is used to list files, not to remove them.
From my point of view, i say this is not only bad coding - but harmfull coding, eventhough the intial idea was to to avoid harms.
Hello all,
Solaris 11.
Branch: 0.175.3.35.0.6.0
Asking for some assistance in trying to understand how Apache24 works with svcadm.
I used:
svccfg -s network/http:apache24
listprop
setprop start/user=<rabbit>
setprop start/group=<pod>
This is also set in... (1 Reply)
Here's a snippit from a script I'm working on
srvctl config database | \
awk -F\" '{print "srvctl config database -d " $1 " -a" \
RS "echo =================================================="}' \
> /tmp/x$$.sh
chmod 777 /tmp/x$$.sh
/tmp/x$$.sh
As you can see, I'm piping the... (12 Replies)
Hi,
I have a script that copies a file from one directory to another and compiles it.
What I have now is a menu that calls functions and each function compiles the file.
I want to have a function that compiles the file at the end of the script if the user selects options 1-3 in the menu, but... (0 Replies)
Hello all,
I have created a script that will remove the first two lines of one text file (body.txt) and then add the text from a different text file (header.txt) directly to the beginning of the freshly modified body.txt file. It is as follows:
#!/bin/bash
## This script will add a header... (2 Replies)
To find all the files in your home directory that have been edited in some way since the last tar file, use this command:
find . -newer backup.tar.gz
Is anyone familiar with an older solution?
looking to identify files older then 15mins across several directories.
thanks,
manny (2 Replies)
Hello,
I need to call a function which reside in some package moudle (.pm)
as another user by using su -.
Are anyone know how can I do it?
Thanks (1 Reply)
Dear Friends,
I need a help regarding User defined function in shell script.
My problem is as follows:
my_func.sh
my_funcI(){
grep 'mystring' I.dat
}
my_funcQ(){
grep 'mystring' Q.dat
}
myfuncI
myfuncQ
But As both the function has same function only the... (11 Replies)