summaryrefslogtreecommitdiff
path: root/utils/rd-user
diff options
context:
space:
mode:
Diffstat (limited to 'utils/rd-user')
-rwxr-xr-xutils/rd-user6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/rd-user b/utils/rd-user
index 5b9d479..6b191be 100755
--- a/utils/rd-user
+++ b/utils/rd-user
@@ -44,14 +44,14 @@ my ($dbh, undef, $errorstring) = RHRD::rddb::opendb();
if(defined $dbh) {
if($cmd eq "check") {
(my $result, my $status, $errorstring) = RHRD::rddb::check_user($dbh, $username);
- print "$result, $status: $errorstring\n";
+ print STDERR "$result, $status: $errorstring\n";
RHRD::rddb::closedb($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, $fullname);
unless(defined $cnt) {
- print "$errorstring\n";
+ print STDERR "$errorstring\n";
RHRD::rddb::closedb($dbh);
exit 1;
}
@@ -59,7 +59,7 @@ if(defined $dbh) {
} elsif($cmd eq "remove") {
my @results = RHRD::rddb::remove_user($dbh, $username);
if(!defined $results[0] && defined $results[2]) {
- print "$results[2]\n";
+ print STDERR "$results[2]\n";
} else {
for my $href (@results) {
print int($href->{cnt}) . " " . $href->{name} . " deleted\n";