summaryrefslogtreecommitdiffstats
path: root/server/tools/sss_usermod.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/tools/sss_usermod.c')
-rw-r--r--server/tools/sss_usermod.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/server/tools/sss_usermod.c b/server/tools/sss_usermod.c
index 6ef873b60..65e949784 100644
--- a/server/tools/sss_usermod.c
+++ b/server/tools/sss_usermod.c
@@ -580,8 +580,22 @@ int main(int argc, const char **argv)
if (data->error) {
ret = data->error;
+
DEBUG(1, ("sysdb operation failed (%d)[%s]\n", ret, strerror(ret)));
- ERROR("Transaction error. Could not modify user.\n");
+ switch (ret) {
+ case ENOENT:
+ ERROR("Could not modify user - check if group names are correct\n");
+ break;
+
+ case EFAULT:
+ ERROR("Could not modify user - check if username is correct\n");
+ break;
+
+ default:
+ ERROR("Transaction error. Could not modify user.\n");
+ break;
+ }
+
ret = EXIT_FAILURE;
goto fini;
}