diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java index 243161df88..beca53c3fd 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java @@ -229,7 +229,7 @@ public class OSUtils { */ private static void createLinuxUser(String userName, String userGroup) throws IOException { log.info("create linux os user: {}", userName); - String cmd = String.format("sudo useradd -g %s %s", userGroup, userName); + String cmd = String.format("sudo useradd -m -g %s %s", userGroup, userName); log.info("execute cmd: {}", cmd); exeCmd(cmd); }