From dbbad50c09b4747084809952f72392e631e46966 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Wed, 15 Jul 2015 00:50:19 +0200 Subject: [PATCH] add passwd extraction of passwords --- lib/resources/passwd.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/resources/passwd.rb b/lib/resources/passwd.rb index cc4d40786..06abfc659 100644 --- a/lib/resources/passwd.rb +++ b/lib/resources/passwd.rb @@ -34,6 +34,13 @@ module Serverspec arr.length end + def passwords + parsed = parse() + parsed.map {|x| + x.at(1) + } + end + def homedirs parsed = parse() parsed.map {|x|