# MasterPasswd

Parses /etc/master.passwd

Author: Matt Dainty ma.nosp@m.tt@bodgit-n-s.nosp@m.carper.com

Summary

MasterPasswd | Parses /etc/master.passwd
Reference |
USEFUL PRIMITIVES |
Comments and empty lines |
ENTRIES |
password | pw_passwd
uid | pw_uid
gid | pw_gid
class | pw_class
change | pw_change
expire | pw_expire
name | pw_gecos; the user’s full name
home | pw_dir
shell | pw_shell
entry | struct passwd

### Reference

- man 5 master.passwd

Each line in the master.passwd file represents a single user record, whose colon-separated attributes correspond to the members of the passwd struct

### USEFUL PRIMITIVES

### Comments and empty lines

### ENTRIES

### password

> let password = [ label "password" . sto_to_col? . colon ]

pw_passwd

### uid

> let uid = [ label "uid" . store integer . colon ]

pw_uid

### gid

> let gid = [ label "gid" . store integer . colon ]

pw_gid

### class

> let class = [ label "class" . sto_to_col? . colon ]

pw_class

### change

> let change_date = [ label "change_date" . store integer? . colon ]

pw_change

### expire

> let expire_date = [ label "expire_date" . store integer? . colon ]

pw_expire

### name

> let name = [ label "name" . sto_to_col? . colon ]

pw_gecos; the user’s full name

### home

> let home = [ label "home" . sto_to_col? . colon ]

pw_dir

### shell

> let shell = [ label "shell" . sto_to_eol? ]

pw_shell

### entry

> let entry = [ key username . colon . password . uid . gid . class . change_date . expire_date . name . home . shell . eol ]

struct passwd

> let password = [ label "password" . sto_to_col? . colon ]

pw_passwd

> let uid = [ label "uid" . store integer . colon ]

pw_uid

> let gid = [ label "gid" . store integer . colon ]

pw_gid

> let class = [ label "class" . sto_to_col? . colon ]

pw_class

> let change_date = [ label "change_date" . store integer? . colon ]

pw_change

> let expire_date = [ label "expire_date" . store integer? . colon ]

pw_expire

> let name = [ label "name" . sto_to_col? . colon ]

pw_gecos; the user’s full name

> let home = [ label "home" . sto_to_col? . colon ]

pw_dir

> let shell = [ label "shell" . sto_to_eol? ]

pw_shell

> let entry = [ key username . colon . password . uid . gid . class . change_date . expire_date . name . home . shell . eol ]

struct passwd
Close