CGI-FileManager

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

     my $fm = CGI::FileManager->new(
                            PARAMS => {
                                    AUTH => {
                                            PASSWD_FILE => "/home/user/mypwfile",
                                    }
                            }
                    );
     $fm->run;

     The mypwfile file looks similar to an /etc/passwd file:
     username:password:uid:gid:geco:homedir:shell

     gid and shell are currently not used
     homedir is the directory the user has rights for
     password is encrypted by crypt
     uid is just a unique number

Changes
  v0.01 2004 June 27
     Initial release

  v0.02_01
     Move file/directory

bin/cfm-passwd.pl  view on Meta::CPAN

	exit;
}

if ($action eq "add") {
	print "Password: ";
	chomp(my $newpw = <STDIN>);
	print "Home: ";
	chomp(my $home = <STDIN>);
	my $uid = $pw->maxuid || 0;
	$uid++;
	my $gid = 10;
	my $shell = "none";
	my $geco = $username;
	$pw->user($username, $pw->encpass($newpw), $uid, $gid, $geco, $home, $shell);
	$pw->commit();
	exit;
}
	



sub usage {
	print "$0 filename add username\n";
	print "$0 filename change username\n";

lib/CGI/FileManager.pm  view on Meta::CPAN

 my $fm = CGI::FileManager->new(
			PARAMS => {
				AUTH => {
					PASSWD_FILE => "/home/user/mypwfile",
				}
			}
		);
 $fm->run;

 The mypwfile file looks similar to an /etc/passwd file:
 username:password:uid:gid:geco:homedir:shell

 gid and shell are currently not used
 homedir is the directory the user has rights for
 password is encrypted by crypt
 uid is just a unique number

=head1 Changes


=head2 v0.01 2004 June 27

 Initial release



( run in 2.499 seconds using v1.01-cache-2.11-cpan-5735350b133 )