10-24-2011
Okk, So how can we see whether we are in real user id or effective user id.So groud id also changes accordingly rgt?
And in saved user id it will store the real userid right?
6 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hey all, I'm glad to have found this forum as I'm trying to dive head first into Solaris 8 - been working with it for a few months now and am finally getting a bit comfortable with the layout and concepts. In any case, on to the questions... :D
I was wondering how I would go about displaying... (3 Replies)
Discussion started by: QuadMonk
3 Replies
2. UNIX for Dummies Questions & Answers
what's the most efficient and effective search for a file in a dir ?
I see many guys use this
# find - print
or something as such ? and sometimes pipe it to something else ?
Is there a better way of using "grep" in all of this ?
thanks
simon2000 (3 Replies)
Discussion started by: simon2000
3 Replies
3. UNIX for Dummies Questions & Answers
Here is my situation. On a RedHat 7.3 box, I have a user named jody.
When I log in with jody and type in "id", I get the expected output:
uid=1(jody) gid=1(jody) groups=1(jody), 510(test)
However, I cannot figure which "id" option allows me to change the effective gid. I tried the options... (2 Replies)
Discussion started by: Jody
2 Replies
4. Cybersecurity
I was looking for a good list of words to exclude people from using as passwords, i.e. those that could be guessed easily. I'm working through a whole bunch of suggestions from skullsecurity.org, but I managed to find this page that seems to suggest I have more options than I thought. :b:
I... (1 Reply)
Discussion started by: rbatte1
1 Replies
5. Programming
I figured it out by now. (0 Replies)
Discussion started by: Ralph
0 Replies
6. UNIX for Beginners Questions & Answers
I wish to pull out a list of all user ids on the system, including the privileged ids, the groups to which they belong to. Sometimes after deleting an id also, its home dir does not get deleted or an entry is left behind in /etc/passwd.
Can someone help me with a script to achieve both. (2 Replies)
Discussion started by: ggayathri
2 Replies
LEARN ABOUT HPUX
setreuid
setreuid(2) System Calls Manual setreuid(2)
NAME
setreuid - set real and effective user IDs
SYNOPSIS
DESCRIPTION
The function sets the real and effective user IDs of the current process to the values specified by the ruid and euid arguments. If ruid or
euid is -1, the corresponding effective or real user ID of the current process is left unchanged.
A process with appropriate privileges can set either ID to any value. An unprivileged process can only set the effective user ID if the
euid argument is equal to either the real, effective, or saved user ID of the process.
It is unspecified whether a process without appropriate privileges is permitted to change the real user ID to match the current real,
effective or saved user ID of the process.
RETURN VALUE
Upon successful completion, 0 is returned. Otherwise, -1 is returned and is set to indicate the error.
ERRORS
The function will fail if:
[EINVAL] The value of the ruid or euid argument is invalid or out-of-range.
[EPERM] The current process does not have appropriate privileges, and either an attempt was made to change the
effective user ID to a value other than the real user ID or the saved set-user-ID or an attempt was made to
change the real user ID to a value not permitted by the implementation.
SEE ALSO
getuid(2), setuid(2), <unistd.h>.
CHANGE HISTORY
First released in Issue 4, Version 2.
setreuid(2)