11-09-2009
Beginner:user ID's and group ID's
Hello Gurus,
I just started Unix, i am neither a student nor a proffessional.
i just completed my masters degree and looking for a career in Unix/Linux.
so i will be preparing for myself with the help of different forum's guru's.
i just completed the os basics and going through baiscs of unix.
according to the knowledge i got from books a user ID is used for each user of the Unix as unix is a multiuser operating system.
but what for this effective UID?
group id for a group of people working under the same project.
whats this effective group id.
i have read the effective user id , but didnt understand it completely and its relation with setuserid.
please help me.
i am using richard stevens
thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I can't get a clear answer on this one...
I have a Oracle user created in group 'dba'
when this user touches a file the group displayed is 'sys' - why?
The 'sys' group is not included in the list of secondary groups for this user.
Is this standard to Oracle on Unix? (AIX)
Anybody? (1 Reply)
Discussion started by: errolg
1 Replies
2. UNIX for Dummies Questions & Answers
Hi!
Herez the scenario
1. logged in as user xxxx
$ id
uid=125(xxxx) gid=101(my_grp) groups=0(system),15(users),16(sysadmin),19(adm),110(appl)
$ touch test
$ ls -la test
-rw-r--r-- 1 xxxx system 0 Mar 7 14:31 test
Why is the group of the file test 'system' and not... (2 Replies)
Discussion started by: sdharmap
2 Replies
3. UNIX for Dummies Questions & Answers
All,
How i can add a user to a group so that the user will ahve all permsion on that directory .
(sys12:pnl:/work/cn/>) groups crcv1
canusr
and
(sys12:pnl:/work/cn/>) groups pfmgr
pfw users
i am having the .ssh in the directory /work/cn/ which has permision as drwx------ .
... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies
4. Shell Programming and Scripting
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies
5. Shell Programming and Scripting
Hello,
is there any command which can show a particular user "xyz" is belongs to how many groups
thanks (3 Replies)
Discussion started by: lookinginfo
3 Replies
6. Ubuntu
Hi,
Anyone can help me on how to duplicate privileges and group for useroradb01 to userrootdb01. I have currently using "useroradb01" and create a newly user "userrootdb01".
I want both in the sames privileges and group. Please see the existing users list below;
drwxr-xr-x 53 useroradb01... (0 Replies)
Discussion started by: fspalero
0 Replies
7. Debian
Can someone help in creating a group and user.
syntax to create a Group called Members.
syntax to create a user called AAAA and place in to the Group Members.
Thanks for your help in Advance. (3 Replies)
Discussion started by: sawyer
3 Replies
8. Shell Programming and Scripting
hi
i have vert strange query.. can we add user in unix with out assigned it to any group i mean user which is having no default group or anything..
like this in /etc/passwd file
new_user::::::::
Please help (2 Replies)
Discussion started by: aishsimplesweet
2 Replies
9. Shell Programming and Scripting
If there's anywhere to look this up, it would be just as helpful. I googled and really couldn't find anything relative to this.
ok... General Variables
1) When creating a script I made a file "prog1.sh" does it matter if the end is .sh or is this what has to be done like prog.bash or... (4 Replies)
Discussion started by: austing5
4 Replies
10. Red Hat
Hi,
In the following output you can see the the user "richard" is a member on the team/group "developers":
# id richard
uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers)
but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies
LEARN ABOUT SUSE
setreuid
SETREUID(2) Linux Programmer's Manual SETREUID(2)
NAME
setreuid, setregid - set real and/or effective user or group ID
SYNOPSIS
#include <sys/types.h>
#include <unistd.h>
int setreuid(uid_t ruid, uid_t euid);
int setregid(gid_t rgid, gid_t egid);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
setreuid(), setregid(): _BSD_SOURCE || _XOPEN_SOURCE >= 500
DESCRIPTION
setreuid() sets real and effective user IDs of the calling process.
Supplying a value of -1 for either the real or effective user ID forces the system to leave that ID unchanged.
Unprivileged processes may only set the effective user ID to the real user ID, the effective user ID, or the saved set-user-ID.
Unprivileged users may only set the real user ID to the real user ID or the effective user ID.
If the real user ID is set or the effective user ID is set to a value not equal to the previous real user ID, the saved set-user-ID will be
set to the new effective user ID.
Completely analogously, setregid() sets real and effective group ID's of the calling process, and all of the above holds with "group"
instead of "user".
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
EPERM The calling process is not privileged (Linux: does not have the CAP_SETUID capability in the case of setreuid(), or the CAP_SETGID
capability in the case of setregid()) and a change other than (i) swapping the effective user (group) ID with the real user (group)
ID, or (ii) setting one to the value of the other or (iii) setting the effective user (group) ID to the value of the saved set-user-
ID (saved set-group-ID) was specified.
CONFORMING TO
POSIX.1-2001, 4.3BSD (the setreuid() and setregid() function calls first appeared in 4.2BSD).
NOTES
Setting the effective user (group) ID to the saved set-user-ID (saved set-group-ID) is possible since Linux 1.1.37 (1.1.38).
POSIX.1 does not specify all of possible ID changes that are permitted on Linux for an unprivileged process. For setreuid(), the effective
user ID can be made the same as the real user ID or the save set-user-ID, and it is unspecified whether unprivileged processes may set the
real user ID to the real user ID, the effective user ID, or the saved set-user-ID. For setregid(), the real group ID can be changed to the
value of the saved set-group-ID, and the effective group ID can be changed to the value of the real group ID or the saved set-group-ID.
The precise details of what ID changes are permitted vary across implementations.
POSIX.1 makes no specification about the effect of these calls on the saved set-user-ID and saved set-group-ID.
SEE ALSO
getgid(2), getuid(2), seteuid(2), setgid(2), setresuid(2), setuid(2), capabilities(7)
COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2009-10-17 SETREUID(2)