This file is indexed.

/usr/share/augeas/lenses/dist/masterpasswd.aug is in augeas-lenses 1.10.1-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
(*
 Module: MasterPasswd
 Parses /etc/master.passwd

 Author: Matt Dainty <matt@bodgit-n-scarper.com>

 About: 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

*)

module MasterPasswd =

   autoload xfm

(************************************************************************
 * Group:                    USEFUL PRIMITIVES
 *************************************************************************)

(* Group: Comments and empty lines *)

let eol        = Util.eol
let comment    = Util.comment
let empty      = Util.empty
let dels       = Util.del_str

let word       = Rx.word
let integer    = Rx.integer

let colon      = Sep.colon

let sto_to_eol = Passwd.sto_to_eol
let sto_to_col = Passwd.sto_to_col
(* Store an empty string if nothing matches *)
let sto_to_col_or_empty = Passwd.sto_to_col_or_empty

(************************************************************************
 * Group:                        ENTRIES
 *************************************************************************)

let username    = /[_.A-Za-z0-9][-_.A-Za-z0-9]*\$?/

(* View: password
        pw_passwd *)
let password    = [ label "password"    . sto_to_col?   . colon ]

(* View: uid
        pw_uid *)
let uid         = [ label "uid"         . store integer . colon ]

(* View: gid
        pw_gid *)
let gid         = [ label "gid"         . store integer . colon ]

(* View: class
        pw_class *)
let class       = [ label "class"       . sto_to_col? . colon ]

(* View: change
        pw_change *)
let change_date = [ label "change_date" . store integer? . colon ]

(* View: expire
        pw_expire *)
let expire_date = [ label "expire_date" . store integer? . colon ]

(* View: name
        pw_gecos; the user's full name *)
let name        = [ label "name"        . sto_to_col? . colon ]

(* View: home
        pw_dir *)
let home        = [ label "home"        . sto_to_col?   . colon ]

(* View: shell
        pw_shell *)
let shell       = [ label "shell"       . sto_to_eol? ]

(* View: entry
        struct passwd *)
let entry       = [ key username
                . colon
                . password
                . uid
                . gid
                . class
                . change_date
                . expire_date
                . name
                . home
                . shell
                . eol ]

(* NIS entries *)
let niscommon   =  [ label "password"    . sto_to_col ]?    . colon
               . [ label "uid"         . store integer ]? . colon
               . [ label "gid"         . store integer ]? . colon
               . [ label "class"       . sto_to_col ]?    . colon
               . [ label "change_date" . store integer ]? . colon
               . [ label "expire_date" . store integer ]? . colon
               . [ label "name"        . sto_to_col ]?    . colon
               . [ label "home"        . sto_to_col ]?    . colon
               . [ label "shell"       . sto_to_eol ]?

let nisentry =
  let overrides =
        colon
      . niscommon in
  [ dels "+@" . label "@nis" . store username . overrides . eol ]

let nisuserplus =
  let overrides =
        colon
      . niscommon in
  [ dels "+" . label "@+nisuser" . store username . overrides . eol ]

let nisuserminus =
  let overrides =
        colon
      . niscommon in
  [ dels "-" . label "@-nisuser" . store username . overrides . eol ]

let nisdefault =
  let overrides =
        colon
      . [ label "password"    . sto_to_col_or_empty . colon ]
      . [ label "uid"         . store integer? . colon ]
      . [ label "gid"         . store integer? . colon ]
      . [ label "class"       . sto_to_col?    . colon ]
      . [ label "change_date" . store integer? . colon ]
      . [ label "expire_date" . store integer? . colon ]
      . [ label "name"        . sto_to_col?    . colon ]
      . [ label "home"        . sto_to_col?    . colon ]
      . [ label "shell"       . sto_to_eol? ] in
  [ dels "+" . label "@nisdefault" . overrides? . eol ]

(************************************************************************
 *                                LENS
 *************************************************************************)

let lns        = (comment|empty|entry|nisentry|nisdefault|nisuserplus|nisuserminus) *

let filter     = incl "/etc/master.passwd"

let xfm        = transform lns filter