[Sussex] List of Users

Thomas Adam thomas at edulinux.homeunix.org
Fri May 13 21:43:17 UTC 2005


On Fri, May 13, 2005 at 08:18:34PM +0100, Lee W wrote:
> Hey All,
>
> Does anyone know of a way of getting a list of all the users on a
> system though PAM.

getent passwd | awk -F: '$3 > 499 {print $1}'

> I know that I could just list the /etc/passwd file but I'm trying to
> write something that is more generic and will also work for NIS or
> LDAP (etc) lookups. I suppose it is probably unlikely to be there as
> it is probably a security risk.

Well... :)

> I need to globally update the password aging settings (which I can do
> though chage/passwd) on existing accounts.

Why not just call chage(1)?

-- Thomas Adam

--  
"One of us is a cigar stand, and one of us is a lovely blue incandescent
guillotine" -- Stephen Malkmus, "Type Slowly" from "Brighten The Corners"




More information about the Sussex mailing list