Oracle Solaris
TMA-SOLARIS-8.1
Create Warnings for Standard Login Services
Опис
The contents of the /etc/issue file are displayed prior to the login prompt on the system's console and serial devices and also prior to logins via telnet and Secure Shell. The contents of the /etc/motd file are generally displayed after all successful logins, regardless from where the user is logging in. Audit: /etc/motd and /etc/issue must contain a banner and be mode 644 or more restrictive (motd root:sys, issue root:root); review wording.
Како се проверава
Метод провере: Команда љуске
r=compliant; for f in /etc/motd /etc/issue; do [ -s "$f" ] || r="$f is empty or missing"; done; for f in /etc/motd; do if [ -e "$f" ]; then set -- $(ls -ld "$f"); s=$(printf '%s %s %s\n' "$1" "$3" "$4" | awk -v m='rw-r--r--' -v o='root' -v g='sys' '{ok=1; for(i=1;i<=9;i++) if(substr(m,i,1)=="-" && substr($1,i+1,1)!="-") ok=0; if(o!="" && $2 !~ ("^(" o ")$")) ok=0; if(g!="" && $3 !~ ("^(" g ")$")) ok=0; print (ok ? "ok" : $0)}'); [ "$s" = ok ] || r="$f: $s"; else r="$f: missing"; fi; done; for f in /etc/issue; do if [ -e "$f" ]; then set -- $(ls -ld "$f"); s=$(printf '%s %s %s\n' "$1" "$3" "$4" | awk -v m='rw-r--r--' -v o='root' -v g='root' '{ok=1; for(i=1;i<=9;i++) if(substr(m,i,1)=="-" && substr($1,i+1,1)!="-") ok=0; if(o!="" && $2 !~ ("^(" o ")$")) ok=0; if(g!="" && $3 !~ ("^(" g ")$")) ok=0; print (ok ? "ok" : $0)}'); [ "$s" = ok ] || r="$f: $s"; else r="$f: missing"; fi; done; echo "$r"- Очекивани излаз
compliant
Како се исправља
Метод исправке: Смерница или закрпа инфраструктуре
Perform the following to implement the recommended state: # echo "Authorized users only. All activity may be monitored and reported." > /etc/motd # echo "Authorized users only. All activity may be monitored and reported." > /etc/issue # chown root:root /etc/issue # chmod 644 /etc/issue
Својства
- Оперативни системи
- Било који
- Ознаке
- solarisaccounts
- Референца
- CIS Oracle Solaris 11.4 Benchmark v1.1.0 - 8.1 Create Warnings for Standard Login Services
Проверите овај рачунар
Покрените ово на рачунару за који имате дозволу за проверу. Скенирање ради у режиму само за читање.
tmaegis scan --target solaris