The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

DynGig::Util::Setuid - Become a user by Setting uid/gid or invoking sudo

SYNOPSIS

 use DynGig::Util::Setuid;

 my ( $uid, $gid ) = DynGig::Util::Setuid->setuidgid( 'joe' );

 DynGig::Util::Setuid->sudo( 'root' );

DESCRIPTION

setuidgid( user )

(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.

sudo( user )

Invokes system sudo. Becomes 'root' if user is not specified.

NOTE

See DynGig::Util