Jira (PUP-3021) User resource on AIX returns a non-working structure or 'attributes'

7 views
Skip to first unread message

Eric Sorenson (JIRA)

unread,
Nov 13, 2014, 5:14:30 PM11/13/14
to puppe...@googlegroups.com
Eric Sorenson updated an issue
 
Puppet / Bug PUP-3021
User resource on AIX returns a non-working structure or 'attributes'
Change By: Eric Sorenson
Fix Version/s: PUP 4.0.0
Fix Version/s: PUP 4.x
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.7#6337-sha1:2ed701e)
Atlassian logo

Eric Sorenson (JIRA)

unread,
Nov 13, 2014, 5:15:28 PM11/13/14
to puppe...@googlegroups.com

Gilles Pion (JIRA)

unread,
Sep 17, 2015, 11:43:05 AM9/17/15
to puppe...@googlegroups.com
Gilles Pion commented on Bug PUP-3021
 
Re: User resource on AIX returns a non-working structure or 'attributes'

Still getting that issue with a freshly deployed puppet (version 4.2.2)

This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4)
Atlassian logo

Gilles Pion (JIRA)

unread,
Sep 18, 2015, 3:17:03 AM9/18/15
to puppe...@googlegroups.com

Tony Sirianni (JIRA)

unread,
Dec 17, 2015, 5:55:03 PM12/17/15
to puppe...@googlegroups.com
Tony Sirianni commented on Bug PUP-3021
 
Re: User resource on AIX returns a non-working structure or 'attributes'

Enterpise customer, we ran across this same bug this evening. 2015.3

/opt/puppetlabs/bin/puppet -V
4.3.1

This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Atlassian logo

Moses Mendoza (JIRA)

unread,
Nov 2, 2016, 2:02:03 PM11/2/16
to puppe...@googlegroups.com
Moses Mendoza updated an issue
 
Change By: Moses Mendoza
Labels: aix-parity
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Geoff Nichols (JIRA)

unread,
Nov 30, 2016, 8:28:06 AM11/30/16
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Dec 7, 2016, 1:08:05 PM12/7/16
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Dec 7, 2016, 1:08:05 PM12/7/16
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Labels: AIX aix-parity maintenance

Geoff Nichols (JIRA)

unread,
Dec 7, 2016, 1:08:05 PM12/7/16
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Dec 7, 2016, 1:08:08 PM12/7/16
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Dec 7, 2016, 1:09:06 PM12/7/16
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Labels: AIX aix-parity maintenance  puppethack

Kenn Hussey (JIRA)

unread,
Jan 9, 2017, 2:09:06 PM1/9/17
to puppe...@googlegroups.com

Kenn Hussey (JIRA)

unread,
Jan 11, 2017, 4:47:03 PM1/11/17
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Apr 6, 2017, 3:26:07 PM4/6/17
to puppe...@googlegroups.com

Rob Lucke (JIRA)

unread,
May 16, 2017, 3:09:05 PM5/16/17
to puppe...@googlegroups.com
Rob Lucke updated an issue
Change By: Rob Lucke
Labels: AIX aix-parity  help_wanted  maintenance puppethack  triaged

Josh Cooper (JIRA)

unread,
May 17, 2017, 6:54:03 PM5/17/17
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 4.y
Fix Version/s: PUP 5.y

Moses Mendoza (JIRA)

unread,
May 18, 2017, 1:49:25 PM5/18/17
to puppe...@googlegroups.com
Moses Mendoza updated an issue
Change By: Moses Mendoza
Labels: AIX aix-parity help_wanted maintenance puppethack  triaged

Branan Riley (JIRA)

unread,
May 9, 2018, 3:06:03 PM5/9/18
to puppe...@googlegroups.com
Branan Riley updated an issue
Change By: Branan Riley
Labels: AIX aix aix-parity help_wanted maintenance puppethack type_and_provider user
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Branan Riley (JIRA)

unread,
May 9, 2018, 3:07:04 PM5/9/18
to puppe...@googlegroups.com
Branan Riley updated an issue
Change By: Branan Riley
Labels: AIX aix aix-parity cli help_wanted maintenance puppethack triaged type_and_provider user

Enis Inan (JIRA)

unread,
Aug 7, 2018, 1:43:06 PM8/7/18
to puppe...@googlegroups.com

Enis Inan (JIRA)

unread,
Aug 7, 2018, 1:43:07 PM8/7/18
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Jul 15, 2019, 7:44:04 PM7/15/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Jul 15, 2019, 7:45:05 PM7/15/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Fix Version/s: PUP 5.y
Fix Version/s: PUP 5.5.7

Rich Acosta (JIRA)

unread,
Jul 16, 2019, 8:47:04 AM7/16/19
to puppe...@googlegroups.com
Rich Acosta updated an issue
Change By: Rich Acosta
The `user` resource on AIX returns back non-working Puppet code for the 'attributes' key.

Example:

{code:title=puppet resource user root|borderStyle=solid}
# puppet resource user root | tee /tmp/root.pp

user { 'root':
  ensure           => 'present',
  attributes       => {'account_locked' => 'false', 'admin' => 'true', 'auditclasses' => 'general', 'auth1' => 'SYSTEM', 'auth2' => 'NONE', 'core' => '-1', 'cpu' => '-1', 'daemon' => 'true', 'data' => '-1', 'fsize' => '-1', 'histexpire' => '0', 'histsize' => '0', 'host_last_login' => '
njros1ud710 removed . prudential example .com', 'host_last_unsuccessful_login' => ' njros1ud710 removed . prudential example .com', 'login' => 'true', 'loginretries' => '0', 'maxexpired' => '-1', 'maxrepeats' => '8', 'minalpha' => '0', 'mindiff' => '0', 'mindigit' => '0', 'minlen' => '0', 'minloweralpha' => '0', 'minother' => '0', 'minspecialchar' => '0', 'minupperalpha' => '0', 'name' => 'root', 'nofiles' => '2000', 'pwdwarntime' => '0', 'registry' => 'files', 'rlogin' => 'true', 'rss' => '-1', 'stack' => '-1', 'su' => 'true', 'sugroups' => 'ALL', 'system' => 'compat', 'time_last_login' => '1407248916', 'time_last_unsuccessful_login' => '1407184651', 'tpath' => 'nosak', 'tty_last_login' => '/dev/pts/1', 'tty_last_unsuccessful_login' => 'ssh', 'ttys' => 'ALL', 'umask' => '22', 'unsuccessful_login_count' => '0'},
  comment          => 'root',
  expiry           => '2032-12-31',
  gid              => '0',
  groups           => ['system', 'bin', 'sys', 'security', 'cron', 'audit', 'lp'],
  home             => '/',
  password         => 'WuthH/s1ny/5s',
  password_max_age => '0',
  password_min_age => '0',
  shell            => '/bin/ksh',
  uid              => '0',
}
{code}

And then running the same code through puppet apply:

{code:title=puppet apply root.pp|borderStyle=solid}
# puppet apply /tmp/root.pp
Notice: Compiled catalog for myhost.example.com in environment production in 0.28 seconds
Error: Parameter attributes failed on User[root]: Attributes value pairs must be separated by an = at /tmp/root.pp:14
Wrapped exception:
Attributes value pairs must be separated by an =

{code}


The issue seems to stem from the attributes field. `puppet resource` outputs a key/value object for attributes, while puppet apply seems to expect an array with key=value parts in it as a string.

Changing it to an array of key=value pairs results in a still broken setup. Puppet resource outputs several key/value pairs that are NOT items that can be changed via the chuser command it runs under the covers. It should not return the 'name' or the 'system' keys.

This was my working root.pp file:
{code:title=root.pp}

user { 'root':
  ensure           => 'present',
  attributes => ['account_locked=false', 'admin=true', 'auditclasses=general', 'auth1=SYSTEM', 'auth2=NONE', 'core=-1', 'cpu=-1', 'daemon=true', 'data=-1', 'fsize=-1', 'histexpire=0', 'histsize=0', 'host_last_login=njros1ud710.prudential.com', 'host_last_unsuccessful_login=njros1ud710.prudential.com', 'login=true', 'loginretries=0', 'maxexpired=-1', 'maxrepeats=8', 'minalpha=0', 'mindiff=0', 'mindigit=0', 'minlen=0', 'minloweralpha=0', 'minother=0', 'minspecialchar=0', 'minupperalpha=0', 'nofiles=2000', 'pwdwarntime=0', 'registry=files', 'rlogin=true', 'rss=-1', 'stack=-1', 'su=true', 'sugroups=adm', 'time_last_login=1407248916', 'time_last_unsuccessful_login=1407184651', 'tpath=nosak', 'tty_last_login=/dev/pts/1', 'tty_last_unsuccessful_login=ssh', 'ttys=ALL', 'umask=22', 'unsuccessful_login_count=0'],
  comment          => 'root',
  expiry           => '2032-12-31',
  gid              => '0',
  groups           => ['system', 'bin', 'sys', 'security', 'cron', 'audit', 'lp'],
  home             => '/',
  password         => 'fakepass',
  password_max_age => '0',
  password_min_age => '0',
  shell            => '/bin/ksh',
  uid              => '0',
}
{code}


PS:

Rich Acosta (JIRA)

unread,
Jul 16, 2019, 8:48:04 AM7/16/19
to puppe...@googlegroups.com
Rich Acosta updated an issue
The `user` resource on AIX returns back non-working Puppet code for the 'attributes' key.

Example:
{code:title=puppet resource user root|borderStyle=solid}# puppet resource user root | tee /tmp/root.pp

user { 'root':
  ensure           => 'present',
  attributes       => {'account_locked' => 'false', 'admin' => 'true', 'auditclasses' => 'general', 'auth1' => 'SYSTEM', 'auth2' => 'NONE', 'core' => '-1', 'cpu' => '-1', 'daemon' => 'true', 'data' => '-1', 'fsize' => '-1', 'histexpire' => '0', 'histsize' => '0', 'host_last_login' => 'removed.example.com', 'host_last_unsuccessful_login' => 'removed.example.com', 'login' => 'true', 'loginretries' => '0', 'maxexpired' => '-1', 'maxrepeats' => '8', 'minalpha' => '0', 'mindiff' => '0', 'mindigit' => '0', 'minlen' => '0', 'minloweralpha' => '0', 'minother' => '0', 'minspecialchar' => '0', 'minupperalpha' => '0', 'name' => 'root', 'nofiles' => '2000', 'pwdwarntime' => '0', 'registry' => 'files', 'rlogin' => 'true', 'rss' => '-1', 'stack' => '-1', 'su' => 'true', 'sugroups' => 'ALL', 'system' => 'compat', 'time_last_login' => '1407248916', 'time_last_unsuccessful_login' => '1407184651', 'tpath' => 'nosak', 'tty_last_login' => '/dev/pts/1', 'tty_last_unsuccessful_login' => 'ssh', 'ttys' => 'ALL', 'umask' => '22', 'unsuccessful_login_count' => '0'},

  comment          => 'root',
  expiry           => '2032-12-31',
  gid              => '0',
  groups           => ['system', 'bin', 'sys', 'security', 'cron', 'audit', 'lp'],
  home             => '/',
  password         => 'WuthH/s1ny/5s',
  password_max_age => '0',
  password_min_age => '0',
  shell            => '/bin/ksh',
  uid              => '0',
}
{code}
And then running the same code through puppet apply:
{code:title=puppet apply root.pp|borderStyle=solid}# puppet apply /tmp/root.pp
Notice: Compiled catalog for myhost.example.com in environment production in 0.28 seconds
Error: Parameter attributes failed on User[root]: Attributes value pairs must be separated by an = at /tmp/root.pp:14
Wrapped exception:
Attributes value pairs must be separated by an =

{code}
The issue seems to stem from the attributes field. `puppet resource` outputs a key/value object for attributes, while puppet apply seems to expect an array with key=value parts in it as a string.

Changing it to an array of key=value pairs results in a still broken setup. Puppet resource outputs several key/value pairs that are NOT items that can be changed via the chuser command it runs under the covers. It should not return the 'name' or the 'system' keys.

This was my working root.pp file:
{code:title=root.pp}user { 'root':
  ensure           => 'present',
  attributes => ['account_locked=false', 'admin=true', 'auditclasses=general', 'auth1=SYSTEM', 'auth2=NONE', 'core=-1', 'cpu=-1', 'daemon=true', 'data=-1', 'fsize=-1', 'histexpire=0', 'histsize=0', 'host_last_login= njros1ud710 removed . prudential example .com', 'host_last_unsuccessful_login= njros1ud710 removed . prudential example .com', 'login=true', 'loginretries=0', 'maxexpired=-1', 'maxrepeats=8', 'minalpha=0', 'mindiff=0', 'mindigit=0', 'minlen=0', 'minloweralpha=0', 'minother=0', 'minspecialchar=0', 'minupperalpha=0', 'nofiles=2000', 'pwdwarntime=0', 'registry=files', 'rlogin=true', 'rss=-1', 'stack=-1', 'su=true', 'sugroups=adm', 'time_last_login=1407248916', 'time_last_unsuccessful_login=1407184651', 'tpath=nosak', 'tty_last_login=/dev/pts/1', 'tty_last_unsuccessful_login=ssh', 'ttys=ALL', 'umask=22', 'unsuccessful_login_count=0'],

  comment          => 'root',
  expiry           => '2032-12-31',
  gid              => '0',
  groups           => ['system', 'bin', 'sys', 'security', 'cron', 'audit', 'lp'],
  home             => '/',
  password         => 'fakepass',
  password_max_age => '0',
  password_min_age => '0',
  shell            => '/bin/ksh',
  uid              => '0',
}
{code}
PS:
Reply all
Reply to author
Forward
0 new messages