base-files: remind users to set root password
print a warning when a shell spawns, telling users to set a root password. Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
parent
0b3a64f862
commit
63bd73a5cf
1 changed files with 13 additions and 0 deletions
|
@ -29,3 +29,16 @@ alias ll='ls -alF --color=auto'
|
|||
done
|
||||
unset FILE
|
||||
}
|
||||
|
||||
if ( grep -qsE '^root:[!x]?:' /etc/shadow && \
|
||||
grep -qsE '^root:[!x]?:' /etc/passwd && \
|
||||
[ -z "$FAILSAFE" ] )
|
||||
then
|
||||
cat << EOF
|
||||
=== WARNING! =====================================
|
||||
There is no root password defined on this device!
|
||||
Use the "passwd" command to set up a new password
|
||||
in order to prevent unauthorized SSH logins.
|
||||
--------------------------------------------------
|
||||
EOF
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue