POSIX::1003::User - POSIX handling user and groups
use POSIX::1003::User;
User and group management is provided via many functions, which are not portable either in implementation or in availability. See also http://www.cs.berkeley.edu/~daw/papers/setuid-usenix02.pdf
The implementation of setuid() differs per platform. seteuid() is more consistent and widely available. setresuid() is the most powerful, but not everywhere. Functions which are not implemented will return error ENOSYS.
#------------------
example:
# see also the set*uid examples above my @mygroups = getgroups(); @mygroups or die $!; setgroups(1,2,3) or die $!;
The same use and limitations as the uid functions.
Returns a list of group-ids, which may (or may not) contain the effective group-id.
The username associated with the controling terminal. Simply "getlogin" in perlfunc
Simply "getpwent" in perlfunc
Simply "getpwnam" in perlfunc
Simply "getpwuid" in perlfunc
my ($name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell, $expire) = getpwuid($uid); my $uid = getpwnam($username); my $name = getpwuid($userid);
Simply "getgrent" in perlfunc
Simply "getgrgid" in perlfunc
Simply "getgrnam" in perlfunc
This module is part of POSIX-1003 distribution version 0.94_1, built on May 16, 2013. Website: http://perl.overmeer.net. The code is based on POSIX, which is released with Perl itself. See also POSIX::Util for additional functionality.
Copyrights 2011-2013 on the perl code and the related documentation by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html
To install POSIX::1003, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POSIX::1003
CPAN shell
perl -MCPAN -e shell install POSIX::1003
For more information on module installation, please visit the detailed CPAN module installation guide.