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


POSIX-Account-LDAP documentation  | view source Contained in the POSIX-Account-LDAP distribution.

Index


NAME

Top

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

VERSION

Top

Version 0.01

SYNOPSIS

Top

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

Top

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

Top

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

Top

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

BUGS

Top

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

Top

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

    perldoc POSIX::Account::LDAP

You can also look for information at:

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/POSIX-Account-LDAP

* CPAN Ratings

http://cpanratings.perl.org/d/POSIX-Account-LDAP

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=POSIX-Account-LDAP

* Search CPAN

http://search.cpan.org/dist/POSIX-Account-LDAP

ACKNOWLEDGEMENTS

Top

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

COPYRIGHT & LICENSE

Top


POSIX-Account-LDAP documentation  | view source Contained in the POSIX-Account-LDAP distribution.