SV-215310r508663_rule
V-215310
SRG-OS-000281-GPOS-00111
AIX7-00-002129
CAT III
10
Create the ".logout" file if it does not exist.
Add the following two lines to ".logout" to display a logout message and sleep for "5" seconds:
echo "You are being disconnected."
sleep 5
Create, or modify, ".profile" to include the following line:
trap '$HOME/.logout' EXIT
Verify users have a ".logout" file in their home directory:
# for home in `cut -d: -f6 /etc/passwd`; do ls -alL $home/.logout; done
-rwxr----- 1 root system 297 Jan 29 09:47 /root/.logout
-rwxr----- 1 doejohn staff 297 Jul 4 00:47 /home/doejohn/.logout
If an interactive user does not have their ".logout" file, this is a finding.
Verify that each ".logout" file identified above contains a logout message:
# cat <user_home_directory>/.logout
echo "You are being disconnected."
sleep 5
If the ".logout" file does not display a logout message, this is a finding.
Verify each users' ".profile" file calls "$HOME/.logout" while logging out:
# grep "trap '$HOME/.logout' EXIT " <user_home_directory>/.profile
trap '$HOME/.logout' EXIT
If the ".profile" file does not call "$HOME/.logout", this is a finding.
V-215310
False
AIX7-00-002129
Verify users have a ".logout" file in their home directory:
# for home in `cut -d: -f6 /etc/passwd`; do ls -alL $home/.logout; done
-rwxr----- 1 root system 297 Jan 29 09:47 /root/.logout
-rwxr----- 1 doejohn staff 297 Jul 4 00:47 /home/doejohn/.logout
If an interactive user does not have their ".logout" file, this is a finding.
Verify that each ".logout" file identified above contains a logout message:
# cat <user_home_directory>/.logout
echo "You are being disconnected."
sleep 5
If the ".logout" file does not display a logout message, this is a finding.
Verify each users' ".profile" file calls "$HOME/.logout" while logging out:
# grep "trap '$HOME/.logout' EXIT " <user_home_directory>/.profile
trap '$HOME/.logout' EXIT
If the ".profile" file does not call "$HOME/.logout", this is a finding.
M
4012