I\'m trying to use setuid() and setgid() to set the respective id\'s of a program to drop privileges down from root, but to use them I need to know the uid and gid of the us
Have a look at the getpwnam() and getgrnam() functions.