10-24-2011
So the real ID is when you connect yourself
But if you change personality e.g using su you "become" newID which is the effective ID, for whatever you execute from now will be " as newID " and not your loginID, till you exit and become again yourself
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 DEBIAN
setregid
SETREGID(2) BSD System Calls Manual SETREGID(2)
NAME
setregid -- set real and effective group ID
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
int
setregid(gid_t rgid, gid_t egid);
DESCRIPTION
The real and effective group ID's of the current process are set to the arguments. If the real group ID is changed, the saved group ID is
changed to the new value of the effective group ID.
Unprivileged users may change the real group ID to the effective group ID and vice-versa; only the super-user may make other changes.
Supplying a value of -1 for either the real or effective group ID forces the system to substitute the current ID in place of the -1 argument.
The setregid() system call was intended to allow swapping the real and effective group IDs in set-group-ID programs to temporarily relinquish
the set-group-ID value. This system call did not work correctly, and its purpose is now better served by the use of the setegid(2) system
call.
When setting the real and effective group IDs to the same value, the standard setgid() system call is preferred.
RETURN VALUES
The setregid() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indi-
cate the error.
ERRORS
[EPERM] The current process is not the super-user and a change other than changing the effective group-id to the real group-id was
specified.
SEE ALSO
getgid(2), issetugid(2), setegid(2), setgid(2), setuid(2)
HISTORY
The setregid() system call appeared in 4.2BSD.
BSD
April 16, 1994 BSD