mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:57:35 +00:00
passwd: Provide more verbose output regarding status of changed passwd
passwd should explicitly indicate the status of the password change.
This commit is contained in:
parent
4fd842f566
commit
1a9d0dee2c
1 changed files with 4 additions and 0 deletions
|
@ -93,6 +93,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
if (!target_account.authenticate(current_password.value().characters())) {
|
if (!target_account.authenticate(current_password.value().characters())) {
|
||||||
warnln("Incorrect or disabled password.");
|
warnln("Incorrect or disabled password.");
|
||||||
|
warnln("Password for user {} unchanged.", target_account.username());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -111,6 +112,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
if (new_password.value() != new_password_retype.value()) {
|
if (new_password.value() != new_password_retype.value()) {
|
||||||
warnln("Sorry, passwords don't match.");
|
warnln("Sorry, passwords don't match.");
|
||||||
|
warnln("Password for user {} unchanged.", target_account.username());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,6 +126,8 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
if (!target_account.sync()) {
|
if (!target_account.sync()) {
|
||||||
perror("Core::Account::Sync");
|
perror("Core::Account::Sync");
|
||||||
|
} else {
|
||||||
|
outln("Password for user {} successfully updated.", target_account.username());
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue