/passwd-parser

A toy utility to parse /etc/passwd in unix machines and provide corresponding group from /etc/group

Primary LanguagePython

passwd-parser

Description

Name

passwd-parser - A toy utility to parse /etc/passwd in unix machines and provide corresponding uid, full_name and groups from /etc/group

Usage

Write in Terminal as follows:

python passwd-parser.py [passwd_path] [group_path]

Arguments

Describes all Arguments to Passwd-Parser

passwd_path	  path to passwd file       # default /etc/passwd
group_path	  path to group file        # default /etc/group

Examples

Write in Terminal as follows:

python passwd-parser.py
python passwd-parser.py /etc/passwd /etc/group

Sample Object

{
  "ubuntu": {
          "uid": "1000",
           "full_name": "Ubuntu", 
           "groups": [
                      "adm",
                      "cdrom",

                      "docker",
                      "netdev",
                      "plugdev",
                      "floppy",
                      "audio",
                      "sudo",
                      "video"] 
            },
            
     "man": {
          "uid": "6",
          "full_name": "man",
          "groups": []
}

Author

Written by Saumil Shah. https://github.com/hellosaumil
More details about this project can be found at : https://github.com/hellosaumil/passwd-parser

Reporintg Bugs

Report bugs to https://github.com/hellosaumil/passwd-parser/issues