Check out the os module, especially the os.getgid(), os.getuid(), os.setgid(), os.getuid(), methods. There are more , take at a look at Python documentation.
You can start a script as root then change your priveleges with os.setgid() os.setuid() methods. Note: those methods operate with integer user and group IDs, not with user and group names. Hope that helps, -Nick Vatamaniuc [EMAIL PROTECTED] wrote: > hi > > due to certain constraints, i will running a python script as root > inside this script, also due to some constraints, i need to switch user > to user1 to run the > rest of the script...is there a way ?thanks -- http://mail.python.org/mailman/listinfo/python-list