Issue #21148 has been reported by Andrew Parker.
----------------------------------------
Bug #21148: 'puppet resource user' does not report the correct home directory
on Solaris
https://projects.puppetlabs.com/issues/21148
* Author: Andrew Parker
* Status: Accepted
* Priority: Normal
* Assignee:
* Category:
* Target version:
* Affected Puppet version:
* Keywords:
* Branch:
----------------------------------------
The `home` that is reported is `/home/username`, however, this value cannot be
used for managing the user or adding a user. This means that the output of
`puppet resource user` cannot be fed into `puppet apply` to recreate, or
enforce, that state.
<pre>
root@solaris-11-32-2:~# puppet resource user buggy ensure=present
Notice: /User[buggy]/ensure: created
user { 'buggy':
ensure => 'present',
}
root@solaris-11-32-2:~# puppet resource user buggy > buggy.pp
root@solaris-11-32-2:~# puppet resource user buggy ensure=absent
Notice: /User[buggy]/ensure: removed
user { 'buggy':
ensure => 'absent',
}
root@solaris-11-32-2:~# cat buggy.pp
user { 'buggy':
ensure => 'present',
gid => '10',
home => '/home/buggy',
password => 'UP',
password_max_age => '-1',
shell => '/usr/bin/bash',
uid => '60008',
}
root@solaris-11-32-2:~# puppet apply buggy.pp
Warning: Stringifying facts is deprecated, see the stringify_facts setting
(at
/usr/ruby/1.8/lib/ruby/site_ruby/1.8/puppet/indirector/facts/facter.rb:58:in
`find')
Error: Could not create user buggy: Execution of '/usr/sbin/useradd -u 60008 -s
/usr/bin/bash -g 10 -d /home/buggy buggy' returned 3: UX: /usr/sbin/useradd:
ERROR: Path must not start with '/home/'.
UX: /usr/sbin/useradd: ERROR: /home/buggy is not a valid path name. Choose
another.
Error: /User[buggy]/ensure: change from absent to present failed: Could not
create user buggy: Execution of '/usr/sbin/useradd -u 60008 -s /usr/bin/bash -g
10 -d /home/buggy buggy' returned 3: UX: /usr/sbin/useradd: ERROR: Path must
not start with '/home/'.
UX: /usr/sbin/useradd: ERROR: /home/buggy is not a valid path name. Choose
another.
Notice: Finished catalog run in 0.13 seconds
root@solaris-11-32-2:~#
</pre>
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.