s6
Software
www.skarnet.org

The s6-envuidgid program

s6-envuidgid sets the UID and GID environment variables, then executes into another program.

Interface

     s6-envuidgid account prog...

Notes

s6-envuidgid behaves exactly like envuidgid except for the exit code if account does not exist.

s6-envuidgid is useful when running a program that must start as root but can drop its privileges later. Such a program can read its new uid/gid info from the UID and GID environment variables.