This is an automated email from the ASF dual-hosted git repository.

zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 82ffdbfb30 fix: create linux user with home dir (#15670)
82ffdbfb30 is described below

commit 82ffdbfb303671717b5b1ee7871ba4153ca3da51
Author: zer0e <[email protected]>
AuthorDate: Tue Mar 5 11:30:23 2024 +0800

    fix: create linux user with home dir (#15670)
---
 .../src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
     }

Reply via email to