12-09-2008
how can I find all tool which can setuid like chmod
for security issue ,i would like to find all privilege tools that can setuid
how to do this
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I've got 100 directories that each have 2 directories with in them.
Structered like this:
/home/domains/domain1/
through to
/home/domains/domain100/
and those 2 directories mentioned above are here:
/home/domains/domain1/directory1/
/home/domains/domain1/directory2/
through to... (7 Replies)
Discussion started by: Neko
7 Replies
2. UNIX for Advanced & Expert Users
Hello to all Unix gurus..
I am writing a generic script which takes the options of unix command as input and concatenate all the pieces and forms a complete executable command.
I am getting an error with the following command as I am resetting my own permission on the root directory. When the... (4 Replies)
Discussion started by: sdlayeeq
4 Replies
3. Shell Programming and Scripting
About System and Perl: Sun Solaris 5.9 sparc, Perl 5.6.1
I've decided to use the perl file::find module to look for all the SETUID and SETGID files on my unix boxes. I wrote something like this: (I've shorted it a little to make it simple)
#!/opt/perl/bin/perl
use File::Find;
find... (1 Reply)
Discussion started by: x96riley3
1 Replies
4. Shell Programming and Scripting
I am trying to change permission for all subdirectories and files inside folder1 so this is what i came with after many seraches on the internet. man find and man chmod mirc and few articles.
find .public_html/folder1 -print0 | xargs -0 chmod 777
what's wrong with this command?
it is FTP... (33 Replies)
Discussion started by: smoother
33 Replies
5. HP-UX
how can I find defalut connection browser and default mail tool
if i installed three browser ,and two mail tools
how can I find my default connection browser and default mail tool (1 Reply)
Discussion started by: alert0919
1 Replies
6. UNIX Desktop Questions & Answers
I would like to list files with setuid and setgid set up. I used the find command, but I got a lot of permission denied error. I tried to redirect the error to the hole it does not work. I used the command string below
find . -type f \( -perm -4000 -o -perm -2000 \) -exec ls {} \; 2>/dev/null... (3 Replies)
Discussion started by: Pouchie1
3 Replies
7. UNIX and Linux Applications
i think it is the same in both... Iam i right? (1 Reply)
Discussion started by: sumaiya
1 Replies
8. Shell Programming and Scripting
Hello everyone, my friend is asking for yOur Help. He is asking the script for combined find and changemode utility... Thank you (4 Replies)
Discussion started by: iennetastic
4 Replies
9. UNIX for Dummies Questions & Answers
I have a folder called "test" and this folder contains lots of other folders as sub folders, i intend to search for all file ending with .bin and then change the files to executable please how do i do this
---------- Post updated at 10:48 AM ---------- Previous update was at 10:42 AM ----------... (3 Replies)
Discussion started by: oyesiji
3 Replies
10. UNIX for Beginners Questions & Answers
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)
Discussion started by: sreyan32
2 Replies
setuid(2) System Calls Manual setuid(2)
NAME
setuid - Sets the user ID
SYNOPSIS
#include <unistd.h>
int setuid (
uid_t user_id );
Application developers may want to specify an #include statement for <sys/types.h> before the one for <unistd.h> if programs are being
developed for multiple platforms. The additional #include statement is not required on Tru64 UNIX systems or by ISO or X/Open standards,
but may be required on other vendors' systems that conform to these standards.
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
setuid(): XSH5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Specifies the new user ID.
DESCRIPTION
The setuid() function sets the real user ID, effective user ID, and the saved set user ID to the user_id parameter.
To change the real user ID, the effective user ID, and the saved set user ID, the calling process must have superuser privilege. If the
process does not have appropriate privilege, but the user_id parameter is equal to the real user ID or the saved set user ID, the setuid()
function sets the effective user ID to the user_id parameter. The real user ID and saved set user ID remain unchanged.
RETURN VALUES
Upon successful completion, the setuid() function returns a value of 0 (zero). Otherwise, the function returns a value of -1 and sets
errno to indicate the error.
ERRORS
The setuid() function sets errno to the specified values for the following conditions: [Tru64 UNIX] The process is attempting an operation
that would exceeds a system limit, such as the number of tasks or threads allowed for a user ID. The value of the user_id parameter is
invalid. The process does not have superuser privileges, and the user_id parameter does not match the real user ID or the saved set user
ID.
RELATED INFORMATION
Functions: exec(2), getuid(2), setgid(2), setreuid(2)
Standards: standards(5) delim off
setuid(2)