import os
ruid, euid, suid = os.getresuid()
print("Real user id of the current process:", ruid)
print("Effective user id of the current process:", euid)
print("Saved user id of the current process:", suid)
ruid = 100
euid = 200
suid = 300
os.setresuid(ruid, euid, suid)
print("\nReal, effective, and saved user ids changed\n")
ruid, euid, suid = os.getresuid()
print("Real user id of the current process:", ruid)
print("Effective user id of the current process:", euid)
print("Saved user id of the current process:", suid)