Refactoring: don't user @resource instance variable but resource accessor instead
Avoid multiple shell-outs to 'getent passwd'