#! /usr/bin/env python2

import sys
import pwd
import json

def process(name):
  user = pwd.getpwnam(name)
  print json.dumps({key: str(getattr(user, key)) for key in dir(user) if key.startswith("pw_")}, indent=2, sort_keys=True)

map(process, sys.argv[1:])
