
Passwd::Samba

use Passwd::Samba;
my $ps = Passwd::Samba->new();
my $err = $ps->passwd("example", "_plain_text_secret_" );
foreach my $user ($ps->users) {
print "Username: $user\nUID: ", $ps->uid($user), "\n\n";
}
my $uid = $ps->uid('example');
$ps->rename('example', 'new_example');
$pu->del('new_example');
# or
use Passwd::Samba qw(del uid maxuid passwd rename users);
my $err = passwd("example", "_plain_text_secret_" );
foreach my $user (users()) {
print "Username: $user\nUID: ", uid($user), "\n\n";
}
my $uid = uid('example');
rename('example', 'new_example');
del('new_example');

The Passwd::Samba module provides an abstract interface to /etc/samba/smbpasswd format files. It is inspired by Unix::PasswdFile module.

Constructor.
This method will delete the list of users. It has no effect if the supplied user does not exist.
This method returns the maximum UID in use by all users.
Modify a user's password. Returns the result of operation (TRUE or FALSE).
This method changes the username for a user. If NEWNAME corresponds to an existing user, that user will be overwritten. It returns FALSE on failure and TRUE on success.
Read or modify a user's UID. Returns the result of operation (TRUE or FALSE) if UID was specified otherwhise returns the UID.
This alias for passwd. User is created if doesn't exists.
This method returns a list of all existing usernames.


None known.

None known.

Strzelecki Åukasz <strzelec@rswsystems.com>

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