On unix, you could also use: if os.getuid() == 0: to test for 'root'. or if you need the string: import pwd if pwd.getpwuid( os.getuid() )[0] == 'root' : -- Steve Majewski