diff --git a/posix/personal/posix/class_posixAccount.inc b/posix/personal/posix/class_posixAccount.inc
index 491178ff5d73e219d456874d255f7738bf07494e..184363724e736dc9220446f9b7b643a31536e716 100644
--- a/posix/personal/posix/class_posixAccount.inc
+++ b/posix/personal/posix/class_posixAccount.inc
@@ -199,6 +199,7 @@ class posixAccount extends simplePlugin
         ]
       ]
     );
+
     if ((count($this->host) == 1) && ($this->host[0] == '*')) {
       $this->trustMode = 'fullaccess';
     } elseif (count($this->host) > 0) {
@@ -402,6 +403,13 @@ class posixAccount extends simplePlugin
   {
     global $config;
 
+    // Remove the '*' entry from the host array if multiple elements exist
+    if (in_array('*', $this->host) && count($this->host) > 1) {
+      $this->host = array_filter($this->host, function($item) {
+        return $item !== '*';
+      });
+    }
+
     /* Fill gecos */
     if (isset($this->parent) && $this->parent !== NULL) {
       $this->gecos = rewrite($this->parent->getBaseObject()->cn);