1 #!/bin/bash |
1 #!/bin/bash |
2 # |
2 # |
3 ############################################################################# |
3 ############################################################################# |
4 # Copyright (C) 2005-2012 |
4 # Copyright (C) 2005-2013 |
5 # |
5 # |
6 # Michiel Broek <mbse@mbse.eu> |
6 # Michiel Broek <mbse at mbse.eu> |
7 # the Netherlands |
7 # the Netherlands |
8 # |
8 # |
9 # This file is part of SlackSecCheckScripts. |
9 # This file is part of SlackSecCheckScripts. |
10 # |
10 # |
11 # This package is free software; you can redistribute it and/or modify it |
11 # This package is free software; you can redistribute it and/or modify it |
42 OUTPUT=secure1.$$ |
42 OUTPUT=secure1.$$ |
43 |
43 |
44 |
44 |
45 # Mailboxes should be owned by user and unreadable. |
45 # Mailboxes should be owned by user and unreadable. |
46 # |
46 # |
47 /bin/ls -l /var/spool/mail | \ |
47 /bin/ls -l /var/spool/mail | grep -v ^d | \ |
48 awk ' NR == 1 { next; } |
48 awk ' NR == 1 { next; } |
49 $3 != $9 { |
49 $3 != $9 { |
50 printf "\tUser %s mailbox is owned by %s.\n", $9, $3 |
50 printf "\tUser %s mailbox is owned by %s.\n", $9, $3 |
51 } |
51 } |
52 $1 != "-rw-rw----" || $4 != "mail" { |
52 $1 != "-rw-rw----" || $4 != "mail" { |