Kenneth Holter
2011-Dec-19 11:47 UTC
[Puppet Users] Hosting the user password only, not the .bashrc and -bash_profile files
Hi all, We have a number of server on which user "admin" exists, and that have manual modifications to its bashrc and bash_profile files. What I''d like to do is to host its user password from puppet master, but not the bash-files. I tries this (we''re running Puppet Enterprise 2): -- code start -- pe_accounts::user { ''admin'': password => "encrypted_password_here", } -- code end -- but found that puppetmaster overwrites the user''s bash-files. So either I will have to start hosting the bash-files (which I''d like not to at the moment), or I must find a way to only change the admin password. Does anyone know how I get puppet to _not_ overwrite the bash-file, and only host the users password? Best regards, Kenneth -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Bernd Adamowicz
2011-Dec-19 14:08 UTC
AW: [Puppet Users] Hosting the user password only, not the .bashrc and -bash_profile files
Are you sure Puppet does change your bash-files? I got the same configuration a lot of times (Puppet 2.6.6 and 2.6.12) and did not encounter such behavior. Can you give more details? Bernd> -----Ursprüngliche Nachricht----- > Von: puppet-users@googlegroups.com [mailto:puppet- > users@googlegroups.com] Im Auftrag von Kenneth Holter > Gesendet: Montag, 19. Dezember 2011 12:48 > An: puppet-users@googlegroups.com > Betreff: [Puppet Users] Hosting the user password only, not the .bashrc > and -bash_profile files > > Hi all, > > > We have a number of server on which user "admin" exists, and that have > manual modifications to its bashrc and bash_profile files. What I''d > like to do is to host its user password from puppet master, but not the > bash-files. > > I tries this (we''re running Puppet Enterprise 2): > > -- code start -- > pe_accounts::user { ''admin'': > password => "encrypted_password_here", } > -- code end -- > > but found that puppetmaster overwrites the user''s bash-files. So either > I will have to start hosting the bash-files (which I''d like not to at > the moment), or I must find a way to only change the admin password. > > Does anyone know how I get puppet to _not_ overwrite the bash-file, and > only host the users password? > > > Best regards, > Kenneth > > -- > You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet- > users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Jeff McCune
2011-Dec-20 03:44 UTC
Re: [Puppet Users] Hosting the user password only, not the .bashrc and -bash_profile files
On Mon, Dec 19, 2011 at 3:47 AM, Kenneth Holter <kenneho.ndu@gmail.com> wrote:> Hi all, > > > We have a number of server on which user "admin" exists, and that have > manual modifications to its bashrc and bash_profile files. What I''d > like to do is to host its user password from puppet master, but not > the bash-files. > > I tries this (we''re running Puppet Enterprise 2): > > -- code start -- > pe_accounts::user { ''admin'': > password => "encrypted_password_here", > } > -- code end -- > > but found that puppetmaster overwrites the user''s bash-files. So > either I will have to start hosting the bash-files (which I''d like not > to at the moment), or I must find a way to only change the admin > password.The pe_accounts::user resource uses the pe_accounts::home_dir resource by default to manage some basic things about the home directory. We added some basic bashrc files to help get started quickly, but unfortunately it looks like they''re getting in your way more than they''re helping. The bashrc files we put down for you do automatically source ~/.bashrc.custom if it exists. This file isn''t managed by Puppet at all. Would it be possible for you to simply copy existing bashrc customizations you have into ~/.bashrc.custom to continue using the pe_accounts module? Alternatively, I''d like to add some features to the accounts module to accomodate your use case? If you could describe what you''d like to happen I can try to capture it in a feature request for a future release of the module. Perhaps just turning off bashrc files on a per-resource basis would help you?> Does anyone know how I get puppet to _not_ overwrite the bash-file, > and only host the users password?Unfortunately I don''t see a way to do this without modifying the pe_accounts module itself, which will make upgrades difficult. You could "fork" the module by copying and pasting everything into your own module that''s not named pe_accounts, but clearly this isn''t ideal either. Hope this helps, -- Jeff McCune -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.