summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authorbrapru <brapru@pm.me>2021-05-24 16:27:35 -0400
committerAndreas Kling <kling@serenityos.org>2021-06-17 19:54:38 +0200
commit1a9d0dee2c885b119076044ede34e8e7a117a015 (patch)
tree394248d8ece480faa95f10c89f9e15a6b51a6781 /Userland/Utilities
parent4fd842f5661d1302513f94bddb269ce1462610d2 (diff)
downloadserenity-1a9d0dee2c885b119076044ede34e8e7a117a015.zip
passwd: Provide more verbose output regarding status of changed passwd
passwd should explicitly indicate the status of the password change.
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/passwd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Utilities/passwd.cpp b/Userland/Utilities/passwd.cpp
index e185ed38fa..bf05220a7f 100644
--- a/Userland/Utilities/passwd.cpp
+++ b/Userland/Utilities/passwd.cpp
@@ -93,6 +93,7 @@ int main(int argc, char** argv)
if (!target_account.authenticate(current_password.value().characters())) {
warnln("Incorrect or disabled password.");
+ warnln("Password for user {} unchanged.", target_account.username());
return 1;
}
}
@@ -111,6 +112,7 @@ int main(int argc, char** argv)
if (new_password.value() != new_password_retype.value()) {
warnln("Sorry, passwords don't match.");
+ warnln("Password for user {} unchanged.", target_account.username());
return 1;
}
@@ -124,6 +126,8 @@ int main(int argc, char** argv)
if (!target_account.sync()) {
perror("Core::Account::Sync");
+ } else {
+ outln("Password for user {} successfully updated.", target_account.username());
}
return 0;