X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Fpassword.pl;h=b408278df2356b12da3a7c2b4571e7e3bfe99712;hb=4f4cd7ea04f04162f2e755981b4c716deb792cef;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=8b8c9033879165730ca7601c2364e315782f25c7;p=spider.git diff --git a/cmd/set/password.pl b/cmd/set/password.pl index e69de29b..b408278d 100644 --- a/cmd/set/password.pl +++ b/cmd/set/password.pl @@ -0,0 +1,30 @@ +# +# set a user's password +# +# Copyright (c) 1998 Iain Phillips G0RDI +# 21-Dec-1998 +# +# Syntax: set/pass +# + +my ($self, $line) = @_; +my @args = split /\s+/, $line; +my $call; +my $pass = shift @args; +my @out; +my $user; +my $ref; + +return (1, $self->msg('e5')) if $self->priv < 9; + +foreach $call (@args) { + $call = uc $call; + if ($ref = DXUser->get_current($call)) { + $ref->passwd($pass); + $ref->put(); + push @out, $self->msg("password", $call); + } else { + push @out, $self->msg('e3', 'User record for', $call); + } +} +return (1, @out);