Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4255c2570803100812o9e0f652q7c48bc5ac47262e4@mail.gmail.com>
Date: Mon, 10 Mar 2008 09:12:23 -0600
From: RB <aoz.syn@...il.com>
To: john-users@...ts.openwall.com
Subject: Re: How to determine # users with a shadow file

>  First how would I determine the number of users (not pseudo users) on a box
>  from its shadow file?
One way:
grep -c ':\$' /etc/shadow
Another:
awk -F: '($2 ~ /^\$/){print $0}' /etc/shadow | wc -l

I'm not sure what you're calling 'pseudo' users, because if a user is
in /etc/[passwd,shadow] they're fully valid, if not locked down to a
certain extent.  Making a large assumption, I presume that you mean
'users without a password set'.  In that case, any user without a
valid hash/whatever in the container of your choice (passwd, shadow,
tcb...) would fall into that category.  Including those that are
authenticated, say, by kerberos or SMB.  In shadow, all that '*' or
'!' do is provide a placeholder that doesn't confuse programs looking
for a valid hash - I've also seen kerberos installations that use *K*.

>  How does John determine which lines in the shadow file are uers?
I've not read the source of John in this particular case, but I would
presume it does the same thing: look for a valid password hash in the
expected location (field 2 for shadow).

>  I assume these numbers should match up?
That, again, depends on what you expect.  If you're not getting what
you think you should, it might be prudent to spend some time
understanding the typical UNIX authentication process.  It sounds like
you're trying to beat around the bush on a particular problem; if you
share that (or what you can of it) with us you'll likely get a clearer
and more helpful answer.  There isn't much with passwords & auth that
someone on this list hasn't done before.


RB

-- 
To unsubscribe, e-mail john-users-unsubscribe@...ts.openwall.com and reply
to the automated confirmation request that will be sent to you.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.