diff options
Diffstat (limited to 'server/tools')
-rw-r--r-- | server/tools/sss_groupadd.c | 10 | ||||
-rw-r--r-- | server/tools/sss_useradd.c | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/server/tools/sss_groupadd.c b/server/tools/sss_groupadd.c index 431e34b6..5e1aeb9b 100644 --- a/server/tools/sss_groupadd.c +++ b/server/tools/sss_groupadd.c @@ -208,7 +208,15 @@ int main(int argc, const char **argv) if (group_ctx->error) { ret = group_ctx->error; - DEBUG(0, ("Operation failed (%d)[%s]\n", ret, strerror(ret))); + switch (ret) { + case EEXIST: + DEBUG(0, ("The group %s already exists\n", group_ctx->groupname)); + break; + + default: + DEBUG(0, ("Operation failed (%d)[%s]\n", ret, strerror(ret))); + break; + } ret = EXIT_FAILURE; goto fini; } diff --git a/server/tools/sss_useradd.c b/server/tools/sss_useradd.c index 78ded2ee..f573877f 100644 --- a/server/tools/sss_useradd.c +++ b/server/tools/sss_useradd.c @@ -456,7 +456,15 @@ int main(int argc, const char **argv) if (user_ctx->error) { ret = user_ctx->error; - DEBUG(0, ("Operation failed (%d)[%s]\n", ret, strerror(ret))); + switch (ret) { + case EEXIST: + DEBUG(0, ("The user %s already exists\n", user_ctx->username)); + break; + + default: + DEBUG(0, ("Operation failed (%d)[%s]\n", ret, strerror(ret))); + break; + } ret = EXIT_FAILURE; goto fini; } |