Davit Avsharyan <avshar...@gmail.com> wrote: > 1/ I'm wondering why most of the system users have valid shells by > default ? > /cat /etc/passwd | grep -E '(sh|bash)' | wc -l > *21*/
That's not necessarily sufficient to determine valid shells: the absence of a shell definition implies the use of /bin/sh, so you need to check that, too. Something like this should probably give you a definitive list - SS=$(grep '^/' /etc/shells | xargs) for S in $SS ''; do getent passwd | awk -F: -v S="$S" '{if ($7 == S) print $1, $7}' done Chris -- To UNSUBSCRIBE, email to debian-security-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/djs2u8xfrv....@news.roaima.co.uk