Re: [Puppet Users] Step by step guide to setting user passwords

2011-08-07 Thread Ohad Levy
On Wed, Aug 3, 2011 at 12:21 PM, Peter Meier peter.me...@immerda.ch wrote:
 Can someone walk me through the steps of sending out a password to all
 my computers for user student.

 I do this a lot:

 yes 'PASSWORD' | passwd username

 Then you can extract the password from /etc/shadow

 also  see here:

 http://serverfault.com/questions/87874/how-should-someone-create-an-encrypted-password-for-etc-shadow


 No need to go over /etc/shadow or use mkpasswd (which is not available
 that easy on all distros). How about

 # salt=`pwgen 8 1`; pass=`pwgen -s 12 1`;ruby -e puts \
  ARGV[0].crypt('\$6\$'  ARGV[1]  '\$') $pass $salt; echo $pass
 $6$eemaihic$3gwFGQxMWE8n/KMZlNe3O9dVoQC5zCXrtabhpCLeDp54eYTGK8WAHovxYZLaQf8YF93Hwfh466CQ966Xoh6O81
 FmstT8KObWVu

crypt might yield a different output depending on the c crypt lib, so
in theory it may not work across all os's.

Ohad
 ?

 ~pete

 --
 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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Config files based on rpm version

2011-08-07 Thread John Martin
You could creat a fact that returns the version number of the package
installed.  Then in the configuration file use Boolean logic to set
values and blocks of the config file templates accordingly.  Note that
there is a puppet function you will need to compare the version
strings however I don't know it off the top of my head.

John

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Step by step guide to setting user passwords

2011-08-07 Thread Jamie
Sorry, kinda late on this one, but seems some easy methods left out.

Use grub-md5-crypt
$ grub-md5-crypt
Password:
Retype password:
$1$nS12E0$nmw5cTWJLwW7KujMpApKh0 -- PUT THE RESULT IN YOUR
MANIFEST

or use the openssl command
$ openssl passwd -1
Password:
Verifying - Password:
$1$SF8zTedH$rfFKDI1pS2ljMRP14tYTj0 -- PUT THE RESULT IN YOUR
MANIFEST








On Aug 2, 3:52 pm, Jfro jason.shir...@gmail.com wrote:
 I'm new to Puppet but have searched this group and Puppet docs for how to
 set up user passwords using puppet.  I haven't found a clear answer about
 setting user passwords.

 I understand that it is a security risk to send plain text passwords via
 Puppet.  However, for my use case (setting up one student user on a school
 computer lab) I think the risk is acceptable.

 Can someone walk me through the steps of sending out a password to all my
 computers for user student.

 My puppetmaster and puppets are running Ubuntu Lucide 10.4 LTS.

 Thanks for getting a newbie off the ground!

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Redmine and Forge outage

2011-08-07 Thread James Turnbull
Hi all

This morning one of our hosting boxes - the one hosting our Redmine
issues box and the Forge site - went down.  The issue was a DC one and
has been resolved.

We apologise for any inconvenience and please feel free to email me if
you have any continued issues!

Thanks

James Turnbull

-- 
James Turnbull
Puppet Labs
1-503-734-8571

Join us for PuppetConf http://www.bit.ly/puppetconfsig, September 22nd
and 23rd in Portland, Oregon, USA.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Help setting up Ubuntu preseed for Puppet Clients

2011-08-07 Thread Jfro
This is extremely helpful!

I didn' t realize that puppet was not set up to install upon boot.

I hoping to finalize my preseeed file soon and I'll let you know how it 
went.

Thanks,
Jason

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/3mqC9kWnWBIJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] resuable module patterns

2011-08-07 Thread ashwoods
i'm trying to write a couple of modules to install generic python 
ruby apps.
how do you handle dependencies that are present in two modules, i.e. a
package dependency,
without causing an already defined error.

lets say:

module django:

class django {
 package { build-essential':
   ensure = present,
 }
 
 
}

module ruby_on_rails:
class ruby {
 package { build-essential':
   ensure = present,
 }
 
 
}

if i define this like this,  I get an already defined error. I know I
can fix this by defining a third class and import it from the others,
but you can only do that with the modules you control.

So how do you define package dependencies in a module in a
encapsulated and reusable way.
it seems that its common to include 3rd party puppet modules by
linking them via git submodules or by placing them under the module
folders, but if i have to fork every 3rd party module that causes the
error it seems that i am doing something wrong.


-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Workaround to Provider groupadd does not support features manages_members ?

2011-08-07 Thread Mohamed Lrhazi
Hello,

I wanted to manage a couple of groups membership, under RedHat,
without managing the users (as they are LDAP users) but found out it
is not supported Is there a workaround to this?

I tried:

group { jbossd:
gid = 520,
members = [user1,user2],
}

Thanks a lot.
Mohamed.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] resuable module patterns

2011-08-07 Thread Denmat
Hi,

You might like to have a base packages module that contains a 
'build-essentials' class (or whatever title you like).

Then include it and reference the package in your ruby/python modules.

include 'basepackages::build-essentials'

...
  require = Package['build-essentials']
...

That help?

Den

On 08/08/2011, at 2:21, ashwoods ashwo...@gmail.com wrote:

 i'm trying to write a couple of modules to install generic python 
 ruby apps.
 how do you handle dependencies that are present in two modules, i.e. a
 package dependency,
 without causing an already defined error.
 
 lets say:
 
 module django:
 
 class django {
 package { build-essential':
   ensure = present,
 }
 
 
 }
 
 module ruby_on_rails:
 class ruby {
 package { build-essential':
   ensure = present,
 }
 
 
 }
 
 if i define this like this,  I get an already defined error. I know I
 can fix this by defining a third class and import it from the others,
 but you can only do that with the modules you control.
 
 So how do you define package dependencies in a module in a
 encapsulated and reusable way.
 it seems that its common to include 3rd party puppet modules by
 linking them via git submodules or by placing them under the module
 folders, but if i have to fork every 3rd party module that causes the
 error it seems that i am doing something wrong.
 
 
 -- 
 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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Workaround to Provider groupadd does not support features manages_members ?

2011-08-07 Thread Denmat
Hi,

Not to clear on your situation but the following is available to you. 

Manage your jbossd groups in LDAP. That will be easiest. Create a posix ldap 
group and add users as your members, remembering to keep your uids and gids 
standard.

The other option is to duplicate the users in the manifest and manage their 
groups. That makes managing accounts a bit more difficult.

I would as a general rule avoid duplication and trying have your user accounts 
and system accounts centrally managed where possible.

Cheers,
Den

On 08/08/2011, at 7:14, Mohamed Lrhazi lrh...@gmail.com wrote:

 Hello,
 
 I wanted to manage a couple of groups membership, under RedHat,
 without managing the users (as they are LDAP users) but found out it
 is not supported Is there a workaround to this?
 
 I tried:
 
 group { jbossd:
gid = 520,
members = [user1,user2],
}
 
 Thanks a lot.
 Mohamed.
 
 -- 
 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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: resuable module patterns

2011-08-07 Thread ashwoods
No, not really. Because that would require me to modify the 3rd party
modules to use that base packages module
instead of how its defined. i.e. if i need build-essentials for my
django module, put it on github, anybody who uses my module
and maybe have another module of their own that also defines build-
essentials, forces them to fork libraries.

I am still very new to puppet, so maybe im missing somewhat obvious.

On 7 Aug., 23:48, Denmat tu2bg...@gmail.com wrote:
 Hi,

 You might like to have a base packages module that contains a 
 'build-essentials' class (or whatever title you like).

 Then include it and reference the package in your ruby/python modules.

 include 'basepackages::build-essentials'

 ...
   require = Package['build-essentials']
 ...

 That help?

 Den

 On 08/08/2011, at 2:21, ashwoods ashwo...@gmail.com wrote:







  i'm trying to write a couple of modules to install generic python 
  ruby apps.
  how do you handle dependencies that are present in two modules, i.e. a
  package dependency,
  without causing an already defined error.

  lets say:

  module django:

  class django {
          package { build-essential':
                ensure = present,
          }
          
          
  }

  module ruby_on_rails:
  class ruby {
          package { build-essential':
                ensure = present,
          }
          
          
  }

  if i define this like this,  I get an already defined error. I know I
  can fix this by defining a third class and import it from the others,
  but you can only do that with the modules you control.

  So how do you define package dependencies in a module in a
  encapsulated and reusable way.
  it seems that its common to include 3rd party puppet modules by
  linking them via git submodules or by placing them under the module
  folders, but if i have to fork every 3rd party module that causes the
  error it seems that i am doing something wrong.

  --
  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+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: resuable module patterns

2011-08-07 Thread Scott Smith
Virtual resources.

On Sun, Aug 7, 2011 at 4:51 PM, ashwoods ashwo...@gmail.com wrote:

 No, not really. Because that would require me to modify the 3rd party
 modules to use that base packages module
 instead of how its defined. i.e. if i need build-essentials for my
 django module, put it on github, anybody who uses my module
 and maybe have another module of their own that also defines build-
 essentials, forces them to fork libraries.

 I am still very new to puppet, so maybe im missing somewhat obvious.

 On 7 Aug., 23:48, Denmat tu2bg...@gmail.com wrote:
  Hi,
 
  You might like to have a base packages module that contains a
 'build-essentials' class (or whatever title you like).
 
  Then include it and reference the package in your ruby/python modules.
 
  include 'basepackages::build-essentials'
 
  ...
require = Package['build-essentials']
  ...
 
  That help?
 
  Den
 
  On 08/08/2011, at 2:21, ashwoods ashwo...@gmail.com wrote:
 
 
 
 
 
 
 
   i'm trying to write a couple of modules to install generic python 
   ruby apps.
   how do you handle dependencies that are present in two modules, i.e. a
   package dependency,
   without causing an already defined error.
 
   lets say:
 
   module django:
 
   class django {
   package { build-essential':
 ensure = present,
   }
   
   
   }
 
   module ruby_on_rails:
   class ruby {
   package { build-essential':
 ensure = present,
   }
   
   
   }
 
   if i define this like this,  I get an already defined error. I know I
   can fix this by defining a third class and import it from the others,
   but you can only do that with the modules you control.
 
   So how do you define package dependencies in a module in a
   encapsulated and reusable way.
   it seems that its common to include 3rd party puppet modules by
   linking them via git submodules or by placing them under the module
   folders, but if i have to fork every 3rd party module that causes the
   error it seems that i am doing something wrong.
 
   --
   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+unsubscr...@googlegroups.com.
   For more options, visit this group athttp://
 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+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Step by step guide to setting user passwords

2011-08-07 Thread Derek J. Balling

On Aug 2, 2011, at 8:35 PM, Len Rugen wrote:
 In puppet, passwd = 
 $6$PVOar6qN$WUTN7HG838PnAdzLYCB4HHVSzE/SX100VVdsiIYlBo7TM5c79R38gx942Lkm710v1HMRmS5VnPbHZ2MwY96wt0,

Make sure to use single-quotes, or puppet will try to evaluate variables 
$PVOar, $WUTN, etc., etc.

D

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Config files based on rpm version

2011-08-07 Thread treydock
To get the version you'll likely have to use facts, but once you have
the facts you can use something like the following...

file {
/etc/pam.d/system-auth-ac:
source  = $operatingsystemrelease ? {
/5.(\d)/ =
puppet:///modules/kerberize/system-auth-ac,
/6.(\d)/ =
puppet:///modules/kerberize/system-auth-ac.centos6,
},

That example points to a different configuration file based on the OS
release number (this example is for CentOS).  So the first condition
is true if 5.x and the second for anything 6.0 and so on.  Should be
similar once you have your custom fact made.

- Trey

On Aug 6, 2:08 am, carl carlla...@gmail.com wrote:
 Hi,
 I have a few virtuozzo servers that are running different versions.
 Some are running 4.0 and some are running 4.6. I am having a hard time
 figuring out how to set the configuration file based on the rpm
 version that is currently installed. Is there a tutorial or page that
 has an example of something like this?

 Thanks

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Step by step guide to setting user passwords

2011-08-07 Thread Michael Stahnke
On Wed, Aug 3, 2011 at 3:13 AM, Ryan Conway ryan.con...@forward.co.uk wrote:
 One more thing - Puppet will fail to set the password unless the
 libshadow gem is present, as this is required to work with shadow
 passwords.
It doesn't have to be the gem.  It can be anything that provides the
libraries (such as the ruby-shadow rpm package).

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.