NAME

Util::User - Become a user by Setting uid/gid and/or sudo

VERSION

This documentation describes version 0.01

SYNOPSIS

use Util::User;

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

Util::IO->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.

AUTHOR

Kan Liu

COPYRIGHT and LICENSE

Copyright (c) 2010. Kan Liu

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.