Re: RHEL/Oracle Linux - user creation.

75 views
Skip to first unread message

刘长元

unread,
Dec 28, 2012, 10:02:33 PM12/28/12
to puppet...@googlegroups.com
user resource use  managehome attribute to decide if need to create home directory. 
and it's default value is false, just try, you can check the results.

On Saturday, December 29, 2012 4:38:07 AM UTC+8, mi...@mikerochford.com wrote:
I am trying to write a manifest that does not create the home directory for the user as it will be on a NAS volume.  It seems that RHEL/Oracle requires your explicitly to use the "-M" options. Is there a way to do this with puppet? 

John Guthrie

unread,
Dec 28, 2012, 10:58:30 PM12/28/12
to puppet...@googlegroups.com
Also make certain that your shadow-utils package is up to date. Older package version had an issue where they didn't allow puppet to handle non-local user names very well. If your home directories are on a NAS, then I suspect that you might be running into a similar issue as well. I found that updating shadow-utils seemed to fix the issue.

John Guthrie
jgut...@book.com
________________________________________
From: puppet...@googlegroups.com [puppet...@googlegroups.com] on behalf of 刘长元 [liuc...@gmail.com]
Sent: Friday, December 28, 2012 10:02 PM
To: puppet...@googlegroups.com
Subject: [Puppet Users] Re: RHEL/Oracle Linux - user creation.
This electronic mail message contains information that (a) is or
may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE
PROTECTED
BY LAW FROM DISCLOSURE, and (b) is intended only for the use of
the addressee(s) named herein. If you are not an intended
recipient, please contact the sender immediately and take the
steps necessary to delete the message completely from your
computer system.

Not Intended as a Substitute for a Writing: Notwithstanding the
Uniform Electronic Transaction Act or any other law of similar
effect, absent an express statement to the contrary, this e-mail
message, its contents, and any attachments hereto are not
intended
to represent an offer or acceptance to enter into a contract and
are not otherwise intended to bind this sender,
barnesandnoble.com
llc, barnesandnoble.com inc. or any other person or entity.

Mike Rochford

unread,
Dec 30, 2012, 9:47:40 PM12/30/12
to puppet...@googlegroups.com
It looks like I need to file a bug report as Oracle change the name of
their linux distribution.

<snippet /usr/lib/ruby/site_ruby/1.8/puppet/provider/user/useradd.rb t>
def check_manage_home
cmd = []
if @resource.managehome?
cmd << "-m"
elsif %w{Fedora RedHat CentOS OEL
OVS}.include?(Facter.value(:operatingsystem))
cmd << "-M"
end
cmd
end
</snippet>

<facter output>
ol6-3:~ # facter operatingsystem
OracleLinux
ol6-3:~ #
</facter output>

-Mike
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>

Garrett Honeycutt

unread,
Jan 2, 2013, 3:52:59 PM1/2/13
to puppet...@googlegroups.com
Thanks for bringing this up. We were able to get this fixed and merged
in master for release in 3.1.0. You could back port by checking out the
small changes from the commit[1].

[1] - https://github.com/puppetlabs/puppet/pull/1359/files

-g

--
Garrett Honeycutt

206.414.8658
http://puppetlabs.com
Reply all
Reply to author
Forward
0 new messages