def get_users(passwd: str) -> dict:
    """Split password output by newline,
      extract user and name (1st and 5th columns),
      strip trailing commas from name,
      replace multiple commas in name with a single space
      return dict of keys = user, values = name.
    """
    splitlines = passwd.splitlines(False)
    result = dict()
    for i in splitlines[1:]:
        cols = i.split(':')
        key = cols[0]
        value = cols[4] if cols[4] else "unknown"
        val = value.strip(',').replace(',', ' ')
        result[key] = ' '.join([j for j in val.split(' ') if len(j) > 0])
    
    return result