This file is indexed.

/usr/share/augeas/lenses/dist/tests/test_passwd.aug is in augeas-lenses 1.4.0-0ubuntu1.1.

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
module Test_Passwd =

let conf = "root:x:0:0:root:/root:/bin/bash
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
free:x:1000:1000:Free Ekanayaka,,,:/home/free:/bin/bash
root:*:0:0:Charlie &:/root:/bin/csh
"

test Passwd.lns get conf =
   { "root"
     { "password" = "x" }
     { "uid" = "0" }
     { "gid" = "0" }
     { "name" = "root" }
     { "home" = "/root" }
     { "shell" = "/bin/bash" } }
   { "libuuid"
     { "password" = "x" }
     { "uid" = "100" }
     { "gid" = "101" }
     { "name" }
     { "home" = "/var/lib/libuuid" }
     { "shell" = "/bin/sh" } }
   { "free"
     { "password" = "x" }
     { "uid" = "1000" }
     { "gid" = "1000" }
     { "name" = "Free Ekanayaka,,," }
     { "home" = "/home/free" }
     { "shell" = "/bin/bash" } }
   { "root"
     { "password" = "*" }
     { "uid" = "0" }
     { "gid" = "0" }
     { "name" = "Charlie &" }
     { "home" = "/root" }
     { "shell" = "/bin/csh" } }

(* Popular on Solaris *)
test Passwd.lns get "+@some-nis-group::::::\n" =
  { "@nis" = "some-nis-group" }

test Passwd.lns get "+\n" =
  { "@nisdefault" }

test Passwd.lns get "+::::::\n" =
  { "@nisdefault"
      { "password" = "" }
      { "uid" = "" }
      { "gid" = "" }
      { "name" }
      { "home" }
      { "shell" } }

test Passwd.lns get "+::::::/sbin/nologin\n" =
  { "@nisdefault"
    { "password" = "" }
    { "uid" = "" }
    { "gid" = "" }
    { "name" }
    { "home" }
    { "shell" = "/sbin/nologin" } }

test Passwd.lns get "+:*:0:0:::\n" =
  { "@nisdefault"
    { "password" = "*" }
    { "uid" = "0" }
    { "gid" = "0" }
    { "name" }
    { "home" }
    { "shell" } }

(* NIS entries with overrides, ticket #339 *)
test Passwd.lns get "+@bob:::::/home/bob:/bin/bash\n" =
 { "@nis" = "bob"
   { "home" = "/home/bob" }
   { "shell" = "/bin/bash" } }

(* NIS user entries *)
test Passwd.lns get "+bob::::::\n" =
 { "@+nisuser" = "bob" }

test Passwd.lns get "+bob::::User Comment:/home/bob:/bin/bash\n" =
 { "@+nisuser" = "bob"
   { "name" = "User Comment" }
   { "home" = "/home/bob" }
   { "shell" = "/bin/bash" } }

test Passwd.lns put "+bob::::::\n" after
  set "@+nisuser" "alice"
= "+alice::::::\n"

test Passwd.lns put "+bob::::::\n" after
  set "@+nisuser/name" "User Comment";
  set "@+nisuser/home" "/home/bob";
  set "@+nisuser/shell" "/bin/bash"
= "+bob::::User Comment:/home/bob:/bin/bash\n"

test Passwd.lns get "-bob::::::\n" =
 { "@-nisuser" = "bob" }

test Passwd.lns put "-bob::::::\n" after
  set "@-nisuser" "alice"
= "-alice::::::\n"