DynGig::Util::Setuid - Become a user by Setting uid/gid or invoking sudo
use DynGig::Util::Setuid; my ( $uid, $gid ) = DynGig::Util::Setuid->setuidgid( 'joe' ); DynGig::Util::Setuid->sudo( 'root' );
(As superuser) sets uid, gid, effective uid, and effective gid as those of 'user'. Returns an the uid and gid of the target user in list context, or an ARRAY reference in scalar context.
Invokes system sudo. Becomes 'root' if user is not specified.
See DynGig::Util
To install DynGig::Util, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DynGig::Util
CPAN shell
perl -MCPAN -e shell install DynGig::Util
For more information on module installation, please visit the detailed CPAN module installation guide.