diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile
index d70bafca49ed0991d903be3f1b63f75a9282aa1b..f241ab2ef38658cfbb2476a087a2a6eba403351a 100644
--- a/package/base-files/files/etc/profile
+++ b/package/base-files/files/etc/profile
@@ -30,8 +30,7 @@ alias ll='ls -alF --color=auto'
 	unset FILE
 }
 
-if ( grep -qsE '^root:[!x]?:' /etc/shadow && \
-     grep -qsE '^root:[!x]?:' /etc/passwd  && \
+if ( grep -qs '^root::' /etc/shadow && \
      [ -z "$FAILSAFE" ] )
 then
 cat << EOF