summaryrefslogtreecommitdiff
path: root/utils/rd-user
diff options
context:
space:
mode:
Diffstat (limited to 'utils/rd-user')
-rwxr-xr-xutils/rd-user5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/rd-user b/utils/rd-user
index 019f004..c891985 100755
--- a/utils/rd-user
+++ b/utils/rd-user
@@ -32,12 +32,13 @@ if ($> != 0 ) {
my $num_args = $#ARGV + 1;
if ($num_args != 2) {
- print STDERR "Usage: rd-user (check|add|remove) <username>\n";
+ print STDERR "Usage: rd-user (check|add|remove) <username> [ fullname ]\n";
exit 1;
}
my $cmd = $ARGV[0];
my $username = $ARGV[1];
+my $fullname = $ARGV[2];
my ($dbh, undef, $errorstring) = RHRD::rddb::opendb();
if(defined $dbh) {
@@ -48,7 +49,7 @@ if(defined $dbh) {
exit $result;
} elsif($cmd eq "add") {
my $token = mkpasswd(-length => 16, -minnum => 3, -minupper => 3, -minspecial => 0);
- (my $cnt, undef, $errorstring) = RHRD::rddb::add_user($dbh, $username, $token);
+ (my $cnt, undef, $errorstring) = RHRD::rddb::add_user($dbh, $username, $token, $fullname);
unless(defined $cnt) {
print "$errorstring\n";
RHRD::rddb::closedb($dbh);