In the os module documentation, 6.1.1 Process Parameters geteuid() Return the current process' effective user id. Availability: Unix. getuid() Return the current process' user id. Availability: Unix. Same stuff exists for the group as well...