Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

seteuid(2) [hpux man page]

seteuid(2)							System Calls Manual							seteuid(2)

NAME
seteuid(), setegid() - set effective user and group IDs SYNOPSIS
DESCRIPTION
sets the effective user ID of the calling process, if euid is equal to the current real or saved user ID, or if the process has appropriate privileges. The real user ID and saved set-user-ID remain unchanged. sets the effective group ID of the calling process, if egid is equal to the current real or saved group ID, or if the process has appropri- ate privileges. The real group ID, saved set-group-ID and any supplementary group IDs remain unchanged. RETURN VALUE
Upon successful completion, and return 0; otherwise, they return -1 and set to indicate the error. ERRORS
and fail if any of the following conditions are encountered: euid, or egid, is not a valid user or group ID. The process does not have appropriate privileges and euid/egid does not match the real use/group ID or the saved set-user-ID/set-group-ID. AUTHOR
and were developed by HP. SEE ALSO
exec(2), getegid(2), geteuid(2), getuid(2), setregid(2), setresgid(2), setresuid(2), setreuid(2), setuid(2). STANDARDS CONFORMANCE
seteuid(2)

Check Out this Related Man Page

setresuid(2)							System Calls Manual						      setresuid(2)

NAME
setresuid, setresgid - set real, effective, and saved user and group IDs SYNOPSIS
DESCRIPTION
sets the real, effective and/or saved user ID of the calling process. If the current real, effective or saved user ID is equal to that of a user having appropriate privileges, sets the real, effective and saved user IDs to ruid, euid, and suid, respectively. Otherwise, only sets the real, effective, and saved user IDs if ruid, euid, and suid each match at least one of the current real, effective, or saved user IDs. If ruid, euid, or suid is leaves the current real, effective or saved user ID unchanged. sets the real, effective and/or saved group ID of the calling process. If the current real, effective or saved user ID is equal to that of a user having appropriate privileges, sets the real, effective, and saved group ID to rgid, egid, and sgid, respectively. Otherwise, only sets the real, effective and saved group ID if rgid, egid, and sgid each match at least one of the current real, effective or saved group ID. If rgid, egid, or sgid is leaves the current real, effective or saved group ID unchanged. Security Restrictions Some or all of the actions associated with this system call require the privilege (CHSUBJIDENT). Processes owned by the superuser will have this privilege. Processes owned by other users may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
Upon successful completion, and return 0; otherwise, they return -1 and set to indicate the error. ERRORS
and fail if any of the following conditions are encountered: ruid, euid, or suid (rgid, egid, or sgid) is not a valid user (group) ID. None of the conditions above are met. AUTHOR
and were developed by HP. SEE ALSO
exec(2), getuid(2), setuid(2), privileges(5). setresuid(2)
Man Page

6 More Discussions You Might Find Interesting

1. Programming

Puzzled with user ID.

I hava been reading AUPE these days. I really am puzzled with the presentation of real user(group) ID, effective user(group) ID. How do they effect on the execution of process? What's the relationship between them? Appreciate your help. (4 Replies)
Discussion started by: lethefe
4 Replies

2. Red Hat

euid and egid frpm proc

hi, can anyone tell me where can i find euid and egid from /proc file system in RHEL 4? i read stat file, but i got only uid and gid, and cudnot find any entry regarding euid and egid.please suggest... thanks, sanjay (2 Replies)
Discussion started by: sanjaykhuntia
2 Replies

3. Programming

seteuid

I am writing programm that changes permission in the running; I used at the command : seteuid(); the id of the process is changed but the permission not, why?? The program: int status; pid_t child = fork(); if (child == 0) { seteuid(1200); // I checks that "1200" is exist id process ... (1 Reply)
Discussion started by: moriah
1 Replies

4. Shell Programming and Scripting

How can i copy user permissions(privileges) to a group

Hey there I have a problem and i was hoping that you guys could help me out I want to copy a user privileges to a group and i need to copy all privileges(Recursively) every directory with all its sub directories and I tried some solution and it did not work. I used the following command:- ... (14 Replies)
Discussion started by: The Dark Knight
14 Replies

5. Shell Programming and Scripting

Special group & user privileges

Special group and user privileges help I'm having some trouble understanding the group and user privileges. So let's say I make a group.. and assign some users to the groups that I made. How would I -- 1) Allow different groups and different users to have full privileges over a file with .X... (5 Replies)
Discussion started by: LibRid
5 Replies

6. Ubuntu

Create New User with the same group nd privileges of the other user

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