NAME

POSIX::Account::LDAP - LDAP posixAccount, posixGroup, netgroup, etc. management

VERSION

Version 0.01

SYNOPSIS

POSIX::Account::LDAP gives you an extensive API to manage POSIX accounts in a LDAP directory.

use POSIX::Account::LDAP;

my $foo = POSIX::Account::LDAP->new( { config => "mysite.cfg" } );
...

EXPORT

A list of functions that can be exported. You can delete this section if you don't export anything, such as for a purely object-oriented module.

FUNCTIONS

new

Create a new object

Options:

* config : configuration file name
* init : load configuration if 

init

Initialise the object by:

* read configuration * start LDAP connection

ldapconnect

Connect to the directory using the configuration.

findnextuid

Find next uid within Configured min & max uid numbers

findnextgid

Find next gid within Configured min & max gid numbers

findnextxid

Find next id in uid and gid number spaces.

useradd( { name => $name , %opts } )

Add a user.

Acceptable named options:

  • create_group => 1

    If present, this option will call groupadd() to create a new group having a gidNumber equal to the user account uidNumber.

  • uid => "name"

    Name of the user (usually less than 8 characters), ASCII only.

  • gecos

    GECOS field (ASCII only).

    Defaults to "Charlie uid".

  • loginShell

    Shell to give to the user. Defaults to /bin/sh.

  • userPassword

    Self descriptive.

  • uidNumber

    uid of the user account (numeric).

  • gidNumber

    gid of the user account (numeric).

    The group having this gid must exist prior to creation.

  • cn

    More descriptive name. Will default to uid.

  • sn

    More descriptive name. Will default to uid.

  • description

    Description of the user account (not used by POSIX, but by LDAP).

    Defaults to "System User uid".

  • homeDirectory

    Home directory of the user account.

    Defaults to "/home/uid".

userdel( { uid => $name } )

Delete a user by name.

groupadd( { name => $name, %opts } )

Add a group.

Acceptable named options:

  • name

  • gidNumber

    gid number of the POSIX group (numeric). Fail if that gid is not available.

    Defaults at next available gid starting from 1000.

  • description

    LDAP relevant information, not used directly by POSIX.

groupdel( { name => $name } )

Delete a group

DESTROY

Not to be used directly, will be called when uninstantiating a POSIX::Account::LDAP object, mainly to disconnect from the LDAP directory.

AUTHOR

Jérôme Fenal, <jerome at fenal.org>

BUGS

Please report any bugs or feature requests to bug-posix-account-ldap at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=POSIX-Account-LDAP. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc POSIX::Account::LDAP

You can also look for information at:

ACKNOWLEDGEMENTS

The Perl community for all those valuable tools that helped creating these module and scripts.

COPYRIGHT & LICENSE

Copyright 2007 Jérôme Fenal, all rights reserved.

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

1 POD Error

The following errors were encountered while parsing the POD:

Around line 639:

Non-ASCII character seen before =encoding in 'Jérôme'. Assuming UTF-8