Could you please kindly help on why my SETUID does not work?
create a file, only root can read write it
create a script under root with SETUID
the script will read above created file
run under non-root account, but still failed? why?
Is it due to 'cat' is not setuid? If so, how can I modify my script to let SETUID take effect?
Is this script in a non-SUID filesystem perhaps? Have a look at the mount options for the filesystem that the script is in. You can probably get it by:-
You can then review /etc/fstab, /etc/vfstab or /etc/filesystems as applicable to your operating system (you don't say which, so these are the most common)
You might also get the same information from the mount command by itself, but this may be OS specific, so I'd be less sure about that.
Repeat this text in a file named notes.txt and run the script
Before bash is a good language a blank line appears
Also, the following notes are displayed incorrectly
What is bad?
==================================
Title : Note 1
==================================
Category: Computer
Date... (3 Replies)
Just learning about the privilege escalation method provided by setuid. Correct me if I am wrong but what it does is change the uid of the current process to whatever uid I set. Right ?
So what stops me from writing my own C program and calling setuid(0) within it and gaining root privileges ?
... (2 Replies)
Why when I use this command do I get "E123"?
echo NCE123 | sed -n 's/\(.*\)\(\{1,\}\{1,5\}\)\(.*\)/\2/p'
But when I used this command, I get NCE123?
echo NCE123 | sed -n 's/\(.*\)\(\{3\}\{1,5\}\)\(.*\)/\2/p'
I thought \{1,\} would mean any number of characters and \{1,5\ would mean 1-5... (1 Reply)
Hi,
I would like some help with the above awk command.
I am trying to use the join command to join two files, no luck.
I need to put the second column from file2.txt into each matching field of file1.txt.
It works OK up to the value of 1000 of the matching column (1at column in both... (13 Replies)
Hi,
I am trying to parse regular XML file where I have to reduce number of decimal points in some xml elements. I am using following AWK command to achive that :
#!/bin/ksh
EDITCMD='BEGIN { FS = ""; OFS=FS }
{
if ( $3 ~ "*\\.*" && length(substr($3,1+index($3,"."))) == 15 ) {... (4 Replies)
hi there,
Would you able to advise that why the syntax or statement below couldn't work as expected ?
/usr/bin/find /backup -name "*tar*" -mtime +2 -exec /bin/rm -f {} \; 1> /dev/null 2>&1
In fact, I was initially located it as in crontab job, but it doesn't work at all. So, I was... (9 Replies)
I am trying to find only those entries where 7018 and another number appear in the end of the line.
7018 2828 1423 2351
7018 2828 14887
2828 7018 1222
123 7018 1487
I am looking for a way to generate only the last two lines. I was trying to do just "grep '7018{1,5}" but it does not... (5 Replies)
The script checks for free space stats on Oracle. If there are any tablespaces with more than 85% usage it prints the details of the tablespace. If all the tablespaces have more than 15% free space, then "All tablespaces have more than 15 pct free space" must be printed on the screen.
When I run... (2 Replies)