Commits

Zhang Huangbin  committed da38e25

Typo.

  • Participants
  • Parent commits fb08062

Comments (0)

Files changed (1)

File iRedMail/functions/system_accounts.sh

     # vmail/vmail must has the same UID/GID on all supported Linux/BSD
     # distributions, required by cluster environment. e.g. GlusterFS.
     if [ X"${DISTRO}" == X"FREEBSD" ]; then
-        pw groupadd -g ${VMAIL_USER_GID} -n ${VMAIL_GROUP_NAME}
+        pw groupadd -g ${VMAIL_USER_GID} -n ${VMAIL_GROUP_NAME} 2>/dev/null
         pw useradd -m \
             -u ${VMAIL_USER_UID} \
             -g ${VMAIL_GROUP_NAME} \
             -s ${SHELL_NOLOGIN} \
             -d ${VMAIL_USER_HOME_DIR} \
-            -n ${VMAIL_USER_NAME}
+            -n ${VMAIL_USER_NAME} 2>/dev/null
     elif [ X"${DISTRO}" == X'OPENBSD' ]; then
-        groupadd -g ${VMAIL_USER_GID} ${VMAIL_GROUP_NAME}
+        groupadd -g ${VMAIL_USER_GID} ${VMAIL_GROUP_NAME} 2>/dev/null
         # Don't use -m to create new home directory
         useradd \
             -u ${VMAIL_USER_UID} \
             -g ${VMAIL_GROUP_NAME} \
             -s ${SHELL_NOLOGIN} \
             -d ${VMAIL_USER_HOME_DIR} \
-            ${VMAIL_USER_NAME}
+            ${VMAIL_USER_NAME} 2>/dev/null
     else
         # Note: on openSUSE, package 'postfix-mysql' will create vmail:vmail with uid/gid=303.
-        groupadd -g ${VMAIL_USER_GID} ${VMAIL_GROUP_NAME}
+        groupadd -g ${VMAIL_USER_GID} ${VMAIL_GROUP_NAME} 2>/dev/null
         useradd -m \
             -u ${VMAIL_USER_UID} \
             -g ${VMAIL_GROUP_NAME} \
             -s ${SHELL_NOLOGIN} \
             -d ${VMAIL_USER_HOME_DIR} \
-            ${VMAIL_USER_NAME}
+            ${VMAIL_USER_NAME} 2>/dev/null
     fi
     rm -f ${VMAIL_USER_HOME_DIR}/.* 2>/dev/null
 
 
     # Low privilege user used to run iRedAdmin.
     if [ X"${DISTRO}" == X'FREEBSD' ]; then
-        pw groupadd -g ${IREDADMIN_USER_GID} -n ${IREDADMIN_USER_NAME}
+        pw groupadd -g ${IREDADMIN_USER_GID} -n ${IREDADMIN_USER_NAME} 2>/dev/null
         pw useradd -m \
             -u ${IREDADMIN_USER_GID} \
             -g ${IREDADMIN_GROUP_NAME} \
             -s ${SHELL_NOLOGIN} \
             -d ${IREDADMIN_HOME_DIR} \
-            -n ${IREDADMIN_USER_NAME}
+            -n ${IREDADMIN_USER_NAME} 2>/dev/null
     else
-        groupadd -g ${IREDADMIN_USER_GID} ${IREDADMIN_GROUP_NAME}
+        groupadd -g ${IREDADMIN_USER_GID} ${IREDADMIN_GROUP_NAME} 2>/dev/null
         useradd -m \
             -u ${IREDADMIN_USER_UID} \
             -g ${IREDADMIN_GROUP_NAME} \
             -s ${SHELL_NOLOGIN} \
             -d ${IREDADMIN_HOME_DIR} \
-            ${IREDADMIN_USER_NAME}
+            ${IREDADMIN_USER_NAME} 2>/dev/null
     fi
 
     echo 'export status_add_user_iredadmin="DONE"' >> ${STATUS_FILE}
 
     # Low privilege user used to run iRedAPD daemon.
     if [ X"${DISTRO}" == X'FREEBSD' ]; then
-        pw groupadd -g ${IREDAPD_DAEMON_USER_GID} -n ${IREDAPD_DAEMON_GROUP}
+        pw groupadd -g ${IREDAPD_DAEMON_USER_GID} -n ${IREDAPD_DAEMON_GROUP} 2>/dev/null
         pw useradd -m \
             -u ${IREDAPD_DAEMON_USER_GID} \
             -g ${IREDAPD_DAEMON_GROUP} \
             -s ${SHELL_NOLOGIN} \
             -d ${IREDAPD_HOME_DIR} \
-            -n ${IREDAPD_DAEMON_USER}
+            -n ${IREDAPD_DAEMON_USER} 2>/dev/null
     else
-        groupadd -g ${IREDAPD_DAEMON_USER_GID} ${IREDAPD_DAEMON_GROUP}
+        groupadd -g ${IREDAPD_DAEMON_USER_GID} ${IREDAPD_DAEMON_GROUP} 2>/dev/null
         useradd -m \
             -u ${IREDAPD_DAEMON_USER_UID} \
             -g ${IREDAPD_DAEMON_GROUP} \
             -s ${SHELL_NOLOGIN} \
             -d ${IREDAPD_HOME_DIR} \
-            ${IREDAPD_DAEMON_USER}
+            ${IREDAPD_DAEMON_USER} 2>/dev/null
     fi
 
     echo 'export status_add_user_iredapd="DONE"' >> ${STATUS_FILE}