You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
465 B

#!/bin/sh
# issue welcome message if there's a guest user
# (the first one configured with empty password)
[ -n "$GLOBAL_USERS" ] || {
echo "** 50-issue: warning, no users created" >&1
exit 0
}
guest=
for u in $GLOBAL_USERS; do
login="${u%%:*}"
[ -n "$login" ] || continue
rest="${u#*:}"
pass="${rest%%:*}"
[ -z "$pass" ] || continue
guest="$login"
break
done
[ -n "$guest" ] || exit 0
echo "Hello friend, say \`$guest' to log in at \\l" >> /etc/issue