X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/825dbb37aaba84f1b341dc6647ba71f89bb6faa6..77ec3b2de9bb1880b258ec6aaf4949f146f6fd8d:/package/base-files/files/bin/login.sh diff --git a/package/base-files/files/bin/login.sh b/package/base-files/files/bin/login.sh index a64c84e1e..04b3fe250 100755 --- a/package/base-files/files/bin/login.sh +++ b/package/base-files/files/bin/login.sh @@ -1,7 +1,10 @@ #!/bin/sh -# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org -if grep -qs '^root:[^!]' /etc/passwd /etc/shadow && [ -z "$FAILSAFE" ]; then +if ( ! grep -qs '^root:[!x]\?:' /etc/shadow || \ + ! grep -qs '^root:[!x]\?:' /etc/passwd ) && \ + [ -z "$FAILSAFE" ] +then echo "Login failed." exit 0 else