diff --git a/Userland/Utilities/usermod.cpp b/Userland/Utilities/usermod.cpp index 0e0708099e..e2a40f7e59 100644 --- a/Userland/Utilities/usermod.cpp +++ b/Userland/Utilities/usermod.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Brandon Pruitt + * Copyright (c) 2023, Tim Ledbetter * * SPDX-License-Identifier: BSD-2-Clause */ @@ -50,6 +51,12 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.parse(arguments); + if (lock && unlock) { + warnln("The -L and -U options are mutually exclusive"); + args_parser.print_usage(stderr, arguments.strings[0]); + return 1; + } + auto account_or_error = Core::Account::from_name(username); if (account_or_error.is_error()) {