#!/bin/sh
#SYSTEMS: Solaris
MSG="# Checking for a non-empty /etc/shells file..."
SYSTEM=`uname -s`
######Solaris######
if [ "$SYSTEM" = "SunOS" ]; then
  echo ""; echo "$MSG"
  if [ -f /etc/shells ]; then
    MODE=`ls -l /etc/shells | awk '{print $1}'`
    OWNER=`ls -l /etc/shells | awk '{print $3}'`
    if [ "$MODE" != "-rw-r--r--" ]; then
      echo "--WARN-- [SHELLS001w] The /etc/shells file may be group and/or world writable"
    fi
    if [ "$OWNER" != "root" ]; then
      echo "--WARN-- [SHELLS001w] The /etc/shells file is not owned by root."
    fi
  else
    echo "--WARN-- [SHELLS001w] The /etc/shells file does not exist."
  fi
fi