1234567891011121314151617181920 |
- #!/bin/bash
- while read linea; do
- user=$(echo "$linea" | cut -d: -f1)
- uid=$(echo "$linea" | cut -d: -f3)
- shell=$(echo "$linea" | cut -d: -f 7)
- if [ $shell != "/usr/sbin/nologin" ]; then
- echo -e "user: $user($uid)\tgid: $(id -gn $uid)($(id -g $uid))"
- fi
- done < /etc/passwd
|