Sponsored Content
Full Discussion: userid
Top Forums UNIX for Advanced & Expert Users userid Post 302132595 by Perderabo on Friday 17th of August 2007 07:03:37 PM
Old 08-17-2007
If user-A runs a program that has the suid bit set, owned by user-B, the process will start with a real uid of user-A and an effective uid of user B.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

validating userid

What's wrong with this syntax? It's part of my 'if' statement but it doesn't seem to pass and it keeps going to the 'else' part. I thought it says that userid must start with a non-numeric character and is between 6 and 10 characters long (alphanumeric). $userid|grep -Eq '^?\{6,10\}+$' if... (2 Replies)
Discussion started by: giannicello
2 Replies

2. Shell Programming and Scripting

date and userid

Hi I am trying to write a script to check the log files for the trancactions based on usr input date and user input user id. I will take the user input userid and user input date and check there are any creation deletion happened, if so mail it other wise say no transactions; I got user... (2 Replies)
Discussion started by: gundu
2 Replies

3. UNIX for Dummies Questions & Answers

display the userid's of a file

what command can I use to display the userid's only of a file; specifially the /etc/passwd file? (5 Replies)
Discussion started by: raidkridley
5 Replies

4. Red Hat

userid with nothing to do on the os/app

Hi All, I got this userid apache with the same userid and groupid and /sbin/nologin and the /www/a home folder is empty. Can I just delete this userid? How can I investigate if userid have something to do with the application? Thanks for any comment you may add. (1 Reply)
Discussion started by: itik
1 Replies

5. Shell Programming and Scripting

What is the command to get name associated with userid?

Hi, 1#what is the command to get name associated with userid? 2#I am using unix on Mainframes thru OMVS. So any one know to to capture TSO command output to a variable on OMVS environment. I tried with below script, but its not working! #!/bin/ksh output=$(tso whois PA1234) echo... (6 Replies)
Discussion started by: prashant43
6 Replies

6. UNIX for Dummies Questions & Answers

touch -t time, using different userid

Hi, I am reciveing files from a remote system on my linux box. These files are named based on time, which I can use to 'touch' the time . I can access/modify these files using my id. but when I tried touching time using my id I am getting error; touch -t 1001261234 1001261234_job2333... (15 Replies)
Discussion started by: rajivbravo
15 Replies

7. Solaris

See who is logging in with a userid

Hi all. Quick question. How can I tell if someone is logging in to our unix servers with an application id and not their personal id? Thanks (2 Replies)
Discussion started by: jamie_collins
2 Replies

8. UNIX for Dummies Questions & Answers

userid and pw

questions: a. where can I customized the password of userid in solaris? say I wanted 10digits long, all caps? thanks (4 Replies)
Discussion started by: lhareigh890
4 Replies

9. UNIX for Advanced & Expert Users

new userid with limited access

Hi, I want to create a user using useradd -m test. But my requirement is he should not change his directory from Home directory. How can I restric the user not to change his directory from his home dir? Thanks, Suresh Double Post (0 Replies)
Discussion started by: suresh3566
0 Replies
setuid(3)						     Library Functions Manual							 setuid(3)

Name
       setuid, seteuid, setruid, setgid, setegid, setrgid - set user and group ID

Syntax
       #include <sys/types.h>
       #include <unistd.h>

       setuid(uid)
       uid_t uid;
       seteuid(euid)
       uid_t euid;
       setruid(ruid)
       uid_t ruid;

       setgid(gid)
       gid_t gid;
       setegid(egid)
       gid_t egid;
       setrgid(rgid)
       gid_t rgid;

Description
       The subroutine sets both the real and effective user ID of the current process to the ID specified.  Likewise, the subroutine sets the real
       and effective group ID of the current process to the ID specified.

       The subroutine sets the effective user ID of the current process, while the subroutine sets the effective group ID of the current process.

       The subroutine sets the real user ID of the current process, while the subroutine sets the real group ID of the current process.

       These calls are only permitted to the super-user or if the argument is the real or effective ID.

Environment
       POSIX
       SYSTEM_FIVE
       When your program is compiled in POSIX or System V mode the following semantics apply when using the or functions:

       If the process is the super-user the real, effective, and saved set (as described in user/group ID are set to uid.

       If the process is not the super-user, but uid is equal to the real or the saved set user/group ID, the effective user/group ID  is  set	to
       uid.  The real and saved set user/group ID remain unchanged.

       POSIX
       In POSIX mode, the function returns a value of type uid_t. The function returns a value of type gid_t.

Return Values
       Zero is returned if the user ID or group ID is set; -1 is returned otherwise.

See Also
       setreuid(2), setregid(2), getuid(2), getgid(2)

																	 setuid(3)
All times are GMT -4. The time now is 05:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy