Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-23-2003, 03:23 AM   #1
LQ Newbie
Registered: Jul 2003
Posts: 5

Rep: Reputation: 0
Difference between UID and EUID

Hi all,

What is the difference between UID and EUID.
Can anyone give me an example where the two have different values ?

Old 07-23-2003, 04:57 AM   #2
LQ Newbie
Registered: Jul 2003
Posts: 5

Original Poster
Rep: Reputation: 0
I mean when will be User Identification number different from effective user identification number ?
When setuid is used the suid will be set, along with suid will euid or uid change ?
Old 07-23-2003, 07:01 AM   #3
Registered: Jul 2003
Location: NL
Distribution: My own
Posts: 92

Rep: Reputation: 18
Effective UID is the one used for permission checks. The whole thing is a bit tricky: Linux supports both a Real UID and a Saved UID (actually, same with HP/UX and others unices). The point is that you cant just change to any EUID. Here are the rules:

- Changing to SUID or RUID is always ok
- If you are root (UID 0), you can change to any UID. This will set both EUID, RUID and SUID.
so is changing from root to any other UID)
- RUID is set to according to your login.
- EUID is different from RUID only when running Set UID programs, like su

The point is that a Set UID program can switch between the UID of the user who invoked it, and the owner of the executable.

A good description can be found in the info manual that comes with glibc (see process persona section)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is my uid/gid? Jeebizz Slackware 2 11-22-2005 11:39 AM
Set UID hinetvenkat Linux - Security 4 06-08-2005 03:50 AM
FREEBSD5.3 platform: PHP setcookie() successful, but $uid = $_COOKIE['uid']; fail tclwp Programming 1 03-30-2005 08:05 PM
What is UID mapping? darai Linux - Newbie 2 06-22-2004 11:53 AM
non UID '0' admin e1000 Linux - General 2 02-26-2004 11:35 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:39 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration