It might be a silly question but I am not understanding EUID and UID correctly.
The description of real ID and effective ID is clear and I get it. Based on what I have found on Google and ebooks, when using su, sudo or SUID, effective ID should change. Also, to my understanding UID in Bash should contain real ID and EUID should contain effective ID.
My assumption is EUID and UID should be different when I am using su, sudo or SUID but whenever I try echo $EUID and echo $UID the result of both are the same.
Also, I tried id -u and id -r -u and again they are always the same.
Could someone explain to me at when and what situation exactly $EUID and $UID are different?