#File: sol_4

1.	grep adm /etc/passwd
       
	UID		4				field 3
	Home Directory	/var/adm			field 6
	Login shell	default (bourne shell: sh)	field 7
	Full Name	0000-Admin(0000)		field 5
	Username	adm				field 1
	GID		4				field 4
	Password	Well hidden in a shadow file!	field 2

2.	newgrp us
	id
	newgrp them
	id
	newgrp exclusive
	id
	newgrp secret
	id

3.	grep s1 /etc/passwd |cut -d: -f1,5,6

	The script to display disk usage for users (excluding system level):

#!/bin/ksh
#File: whos_usin_it

exec 3</etc/passwd
IFS=:
while read -u3 login passwd uid gid comment home_dir shell
 do
  if [ $uid -ge 500 ]
  then
   echo "$login using "`du -s $home_dir | cut -f1`" blocks"
  fi
 done | sort +2 -t" " -rn


OR ... another solution

#!/bin/sh
while read line
 do
  user=`echo $line |/bin/cut -d: -f1`
  name=`echo $line |/bin/cut -d: -f5` #assuming the comment field holds names.
  home=`echo $line |/bin/cut -d: -f6`
  [ "$home" = "/" ] && continue
  blocks=`du -s $home`
  echo "$blocks\t$user ($name)"
 done < /etc/passwd |sort -nr
