aboutsummaryrefslogtreecommitdiffstats
path: root/fripost-passwd
diff options
context:
space:
mode:
Diffstat (limited to 'fripost-passwd')
-rwxr-xr-xfripost-passwd3
1 files changed, 3 insertions, 0 deletions
diff --git a/fripost-passwd b/fripost-passwd
index e03deb5..8fad371 100755
--- a/fripost-passwd
+++ b/fripost-passwd
@@ -153,6 +153,9 @@ $password //= hash( undef, undef, prompt_password() );
# Ensure that the user exists.
+my $domain = (split /\@/, $username, 2)[1];
+die "Error: Unknown domain `" .$domain. "'.\n"
+ unless $ldap->domain->search({ domain => $domain })->count;
die "Error: Unknown user `" .$username. "'.\n"
unless $ldap->user->search({ username => $username })->count;