Python os.geteuid() Method
Example
Find the effective user id of the current process:
#Import os Library
import os
#Print the user id of the current
process
print (os.geteuid())
Try it Yourself »
Definition and Usage
The os.geteuid()
method returns the
effective user id of the current process.
Effective User ID is the owner of the files created by the process. It is the same as the real user but can access files that can only be accessed by root.
Note: Effective user ids are only available on UNIX systems.
Syntax
os.geteuid()
Technical Details
Return Value: | A int value, representing the effective
user id of the current process |
---|---|
Python Version: | 2.6 |