02-23-2012
Please explain setuid bit clearly!
Dear all,
I am newbie with linux, i dont understand any code. I have googled a long time. Please help me explain about setuid bit on linux (Centos 6)
Here:
1/ I chmod u+s for /sbin/iptables but normal user still cannot perform command (ex: /sbin/iptables -L)
2/Someone says : setuid only set on binaries not scripts. But i dont know a way to determine this.
With file /sbin/iptables, it is a script or bin ?
with file /bin/ping, it is a script or bin ( because this file has setuid)
Thanks all,
Sorry for my English.
8 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have a binary. It is having the following permissions
rws rws rwx mqm:mqm runmqtrm
The same program on another machine is
rws rws rwx root: mqm runmqtrm
This program is a setuid program.
This is what my understanding is. Whatever user the program is started under, it will finally be... (0 Replies)
Discussion started by: bandaru
0 Replies
2. Programming
Hello,
If i have 2 strings str1 and str2, i would like to copy/concatenate str2 to str1, from 1st bit leaving the 0th bit.
How do i do it? (2 Replies)
Discussion started by: jazz
2 Replies
3. Programming
hi all,
i have a critical and specific problem with respect to set uid bit on user and the dll's
for a binary, (under the userid A)
it needs libraries from /usr/lib and informix libraries from $INFORMIXDIR/lib/esql
but this binary should be kicked off from id B,
hence s-bit on user is... (5 Replies)
Discussion started by: matrixmadhan
5 Replies
4. HP-UX
hi i have written small script which will login 2 two different users with su but if we run from normal user it prompts for password so
i chnaged the owner of script to root and added setuid bit
with
chmod u+s <script_name>
but when i run the script i get following message
Warning:... (3 Replies)
Discussion started by: zedex
3 Replies
5. Red Hat
Hi,
OS : Linux
I have an executable (P1) owned by user say "abcd" and the setuid bit is set. And there is another executable (P2) which brings up the process (P1).
When the setuid bit is set, the process P1 is failing, if the setuid bit is not set there is no issue.
I was wondering if... (6 Replies)
Discussion started by: ahamed101
6 Replies
6. UNIX for Dummies Questions & Answers
Can anyone explain me difference between setuid and sticky bit? and also between setuid and chown? (3 Replies)
Discussion started by: kkalyan
3 Replies
7. Shell Programming and Scripting
Hi,
Here is the issue. From the program snippet I have Base: 0x1800000000, Size: 0x3FFE7FFFFFFFF which are of 40 and 56 bits. SO I used use bignum to do the math but summing them up I always failed having correct result.
perl interpreter info,
perl, v5.8.8 built for... (0 Replies)
Discussion started by: rrd1986
0 Replies
8. 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
LEARN ABOUT CENTOS
uuid_time
UUID_TIME(3) Libuuid API UUID_TIME(3)
NAME
uuid_time - extract the time at which the UUID was created
SYNOPSIS
#include <uuid.h>
time_t uuid_time(uuid_t uu, struct timeval *ret_tv)
DESCRIPTION
The uuid_time function extracts the time at which the supplied time-based UUID uu was created. Note that the UUID creation time is only
encoded within certain types of UUIDs. This function can only reasonably expect to extract the creation time for UUIDs created with the
uuid_generate_time(3) and uuid_generate_time_safe(3) functions. It may or may not work with UUIDs created by other mechanisms.
RETURN VALUES
The time at which the UUID was created, in seconds since January 1, 1970 GMT (the epoch), is returned (see time(2)). The time at which the
UUID was created, in seconds and microseconds since the epoch, is also stored in the location pointed to by ret_tv (see gettimeofday(2)).
AUTHOR
Theodore Y. Ts'o
AVAILABILITY
libuuid is part of the util-linux package since version 2.15.1 and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
SEE ALSO
uuid(3), uuid_clear(3), uuid_compare(3), uuid_copy(3), uuid_generate(3), uuid_is_null(3), uuid_parse(3), uuid_unparse(3)
util-linux May 2009 UUID_TIME(3)