Gentoo Archives: gentoo-user

From: Bertram Scharpf <lists@×××××××××××××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Users in passwd/shadow
Date: Sun, 30 Sep 2007 02:44:39
Message-Id: 20070930023011.GA17059@bart.simpsons.bs.loc
1 Hi,
2
3
4 I'm fetching the users from the files '/etc/passwd' and
5 '/etc/shadow'. (I use a simple Ruby script.)
6
7 def users fn ; File.open fn do |f| f.map { |l| l[ /^[^:]*/] } end ; end
8
9 pw = users "/etc/passwd"
10 sh = users "/etc/shadow"
11
12 Now I detect there are users in passwd that don't have a
13 shadow entry and even shadowed users that don't appear in
14 passwd:
15
16 > pw - sh
17 => ["man", "smmsp", "portage", "cvs"]
18 > sh - pw
19 => ["games", "guest", "cvsd"]
20
21 Does this have any meaning or is it a bug?
22
23 Bertram
24
25
26 --
27 Bertram Scharpf
28 Stuttgart, Deutschland/Germany
29 http://www.bertram-scharpf.de
30 --
31 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Users in passwd/shadow Dan Farrell <dan@×××××××××.cx>