Просмотр исходного кода

Do now show outout deluser $user / synced all error messages

Jaap Marcus 5 лет назад
Родитель
Сommit
2035affad4
5 измененных файлов с 8 добавлено и 7 удалено
  1. 1 0
      .gitignore
  2. 3 3
      bin/v-add-user
  3. 2 2
      bin/v-add-web-domain-ftp
  4. 1 1
      bin/v-change-user-password
  5. 1 1
      bin/v-change-web-domain-ftp-password

+ 1 - 0
.gitignore

@@ -15,3 +15,4 @@ test/node_modules/
 npm-debug.log
 .phpunit.result.cache
 .vs
+.nova

+ 3 - 3
bin/v-add-user

@@ -63,9 +63,9 @@ check_result $? "user creation failed" $E_INVALID
 echo "$user:$password" | /usr/sbin/chpasswd
 
 if [ $? -ne 0 ]; then 
-    # Delete user on failure again
-    /usr/sbin/deluser "$user"
-    echo "Error: Password not accepted by PAM requirements"
+    # Delete user on failure
+    /usr/sbin/deluser "$user" > /dev/null 2>&1
+    echo "Error: Password not accepted due to PAM restrictions"
     exit 2
 fi
 

+ 2 - 2
bin/v-add-web-domain-ftp

@@ -96,8 +96,8 @@ echo "$ftp_user:$password" | /usr/sbin/chpasswd
 
 if [ $? -ne 0 ]; then 
     # Delete user on failure again
-    /usr/sbin/deluser "$ftp_user"
-    echo "Error: Password not accepted by PAM"
+    /usr/sbin/deluser "$ftp_user"  > /dev/null 2>&1
+    echo "Error: Password not accepted due to PAM restrictions"
     exit 2
 fi
 

+ 1 - 1
bin/v-change-user-password

@@ -49,7 +49,7 @@ check_hestia_demo_mode
 echo "$user:$password" | /usr/sbin/chpasswd
 
 if [ $? -ne 0 ]; then 
-    echo "Error: Password not changed due to PAM requirements"
+    echo "Error: Password not accepted due to PAM restrictions"
     exit 2
 fi
 

+ 1 - 1
bin/v-change-web-domain-ftp-password

@@ -58,7 +58,7 @@ check_hestia_demo_mode
 echo "$ftp_user:$password" | /usr/sbin/chpasswd
 
 if [ $? -ne 0 ]; then 
-    echo "Error: Password not changed due to PAM requirements"
+    echo "Error: Password not accepted due to PAM restrictions"
     exit 2
 fi