Sponsored Content
Full Discussion: find setuid files
Special Forums UNIX Desktop Questions & Answers find setuid files Post 302342274 by jim mcnamara on Saturday 8th of August 2009 10:58:36 AM
Old 08-08-2009
You probably have a typo in the command you are really running. The above command worked okay for me on Solaris 9 running against the /usr tree as a non-priv user.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

setuid

I have a C wrapper programme which basically execute a shell script. The shell script has 700 as permission and oracle is owner of the shell script. The C execuatble has 4711 permission so that means that it has setuid bit set and group and others can execute the C executable. The reason why I am... (2 Replies)
Discussion started by: sanjay92
2 Replies

2. UNIX for Dummies Questions & Answers

Using setuid and setgid

Hi, I have been looking at setuid and setgid. I understand that setuid determines who owns the file and setgid determines which group of people can access the file... yeah?! But i need to know how to actually use setuid and setgid. I'm guessing chmod will feature somewhere.. Any help... (1 Reply)
Discussion started by: crispy
1 Replies

3. Shell Programming and Scripting

Searching for SETUID and SETGID using PERL file find with lstat

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. UNIX for Dummies Questions & Answers

setuid

could u plz give me clear idea of spcial permissions setuid,getuid and striky bit . (1 Reply)
Discussion started by: Prem
1 Replies

5. HP-UX

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 (2 Replies)
Discussion started by: alert0919
2 Replies

6. Solaris

setuid and guid

Hi All, Can someone give me some info about setuid or guid topic? Also about sticky bit. Thanks in advance, itik (9 Replies)
Discussion started by: itik
9 Replies

7. HP-UX

Disable Setuid in HP-UX

Hi All, How to prevent root user from doing setuid(). In otherwords, if the root(any user) is trying to do setuid in a program it should fail. (5 Replies)
Discussion started by: guru13
5 Replies

8. Solaris

Need help with setuid.

Hi Gurus, I need your suggestions,to implement setuid. Here is the situation. I have a user xyz on a solaris zone.He needs to install a package using a pkgadd command but i guess only a root can run that .Is there any way I can set the setuid bit on the pkgadd which is in the location... (6 Replies)
Discussion started by: rama krishna
6 Replies

9. UNIX for Beginners Questions & Answers

What keeps me from abusing setuid(0) and programs with setuid bit set?

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

10. Shell Programming and Scripting

Setuid usage

I'm trying - as an ordinary user - to create a file in the root directory of my system. For that purpose I wrote a simple script that echoes a string into a file. I made the file executable, used sudo to change ownership to root. Like this: $ cat hello #!/bin/bash echo hello > /hello $... (5 Replies)
Discussion started by: Ralph
5 Replies
SETUID(2)						      BSD System Calls Manual							 SETUID(2)

NAME
setuid, seteuid, setgid, setegid -- set user and group ID SYNOPSIS
#include <sys/types.h> #include <unistd.h> int setuid(uid_t uid); int seteuid(uid_t euid); int setgid(gid_t gid); int setegid(gid_t egid); DESCRIPTION
The setuid() function sets the real and effective user IDs and the saved set-user-ID of the current process to the specified value. The setuid() function is permitted if the effective user ID is that of the super user, or if the specified user ID is the same as the effective user ID. If not, but the specified user ID is the same as the real user ID, setuid() will set the effective user ID to the real user ID. The setgid() function sets the real and effective group IDs and the saved set-group-ID of the current process to the specified value. The setgid() function is permitted if the effective user ID is that of the super user, or if the specified group ID is the same as the effective group ID. If not, but the specified group ID is the same as the real group ID, setgid() will set the effective group ID to the real group ID. The seteuid() function (setegid()) sets the effective user ID (group ID) of the current process. The effective user ID may be set to the value of the real user ID or the saved set-user-ID (see intro(2) and execve(2)); in this way, the effective user ID of a set-user-ID exe- cutable may be toggled by switching to the real user ID, then re-enabled by reverting to the set-user-ID value. Similarly, the effective group ID may be set to the value of the real group ID or the saved set-user-ID. RETURN VALUES
Upon success, these functions return 0; otherwise -1 is returned. If the user is not the super user, or the uid specified is not the real, effective ID, or saved ID, these functions return -1. SEE ALSO
getuid(2), getgid(2) STANDARDS
The setuid() and setgid() functions are compliant with the ISO/IEC 9945-1:1990 (``POSIX.1'') specification with _POSIX_SAVED_IDS defined, with the extensions allowed in section B.4.2.2. The seteuid() and setegid() functions are extensions based on the POSIX concept of _POSIX_SAVED_IDS, and have been proposed for a future revision of the standard. 4.2 Berkeley Distribution June 4, 1993 4.2 Berkeley Distribution
All times are GMT -4. The time now is 09:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy