Gentoo Archives: gentoo-user

From: Dan Farrell <dan@×××××××××.cx>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Users in passwd/shadow
Date: Mon, 01 Oct 2007 01:34:37
Message-Id: 20070930201506.7c6ad6d5@pascal.spore.ath.cx
In Reply to: [gentoo-user] Users in passwd/shadow by Bertram Scharpf
1 On Sun, 30 Sep 2007 04:30:11 +0200
2 Bertram Scharpf <lists@×××××××××××××××.de> wrote:
3
4 > Hi,
5 >
6 >
7 > I'm fetching the users from the files '/etc/passwd' and
8 > '/etc/shadow'. (I use a simple Ruby script.)
9 >
10 > def users fn ; File.open fn do |f| f.map { |l| l[ /^[^:]*/] } end ;
11 > end
12 >
13 > pw = users "/etc/passwd"
14 > sh = users "/etc/shadow"
15 >
16 > Now I detect there are users in passwd that don't have a
17 > shadow entry...
18 that makes sense, because some users aren't allowed to log in. For
19 example:
20 | man:x:13:15:man:/usr/share/man:/bin/false
21 the man user can't log in. the shell is /bin/false.
22
23 > and even shadowed users that don't appear in
24 > passwd:
25 >
26 > > pw - sh
27 > => ["man", "smmsp", "portage", "cvs"]
28 > > sh - pw
29 > => ["games", "guest", "cvsd"]
30 now that I can't explain. But I have games and guest myself, although
31 I don't use CVS. So my guess is it's not a bug and you've not been
32 hacked.
33
34 > Does this have any meaning or is it a bug?
35 >
36 > Bertram
37 >
38 >
39 --
40 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Users in passwd/shadow Bertram Scharpf <lists@×××××××××××××××.de>