Issue #21148 has been updated by Andrew Parker.
Assignee changed from Andrew Parker to Stefan Schulte
`/etc/passwd` contained the `/home` version of the home directory (don't have
the one from this exact instance anymore), however according to the Solaris 11
`useradd` docs
<pre>
-d dir
Specifies the auto_home entry for the new user. The path
/home/username is entered in /etc/passwd. When the user
subsequently references /home/username, the automounter
will mount the directory specified here on
/home/username.
The argument to the -d option can be specified as
server:dir where server is the hostname of the machine
on which the home directory resides and dir is the path
to the user's home directory. If the server is a remote
host, then the home directory needs to be created on the
remote host for the system to mount it, when the user
logs in. If no server name is specified then the home
directory will be created on the host where the command
is executed, when the -m option is used.
</pre>
This makes `useradd` on my Solaris machine quite different from a GNU
`useradd`.
<pre>
root@solaris-11-32-2:~# uname -a
SunOS solaris-11-32-2 5.11 11.0 i86pc i386 i86pc
</pre>
----------------------------------------
Bug #21148: 'puppet resource user' does not report the correct home directory
on Solaris
https://projects.puppetlabs.com/issues/21148#change-92714
* Author: Andrew Parker
* Status: Needs More Information
* Priority: Normal
* Assignee: Stefan Schulte
* 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.