Hi all, I wonder how can i set password for user, that was created by "*user*" type. My PC runs on CentOS-4.5 and uses *useradd* as *provider*. As i read on the reductivelabs website, useradd doesn''t supports to manage password. I wonder whether it has other way to manage password or not Thanks for your answer, Best regards TungDH --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
tung dang wrote:> Hi all, > I wonder how can i set password for user, that was created by "/user/" > type. My PC runs on CentOS-4.5 and uses /useradd/ as /provider/. As i > read on the reductivelabs website, useradd doesn''t supports to manage > password. I wonder whether it has other way to manage password or not > Thanks for your answer, > Best regards > TungDHIf you had have read down a little further, you''d read that the useradd provider does support managing passwords, providing the shadow library for Ruby is installed, which I believe is called ''ruby-shadow'', according to yum. Simply install this and you''ll be able to set user passwords. Regards, AJ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I can''t find ruby-shadow in the yum''s repository. I have
installed
ruby-shadow-1.4.1-1.el4.rf.i386.rpm<http://rpm.pbone.net/index.php3/stat/4/idpl/6080585/com/ruby-shadow-1.4.1-1.el4.rf.i386.rpm.html>from
dag.wieers.com. But when i run puppet-client with the following code
* user {"user1":
provider => useradd,
gid => user1,
password => ''123456'',
ensure => present
}
*It will display the message *info: /User[user1]: Provider useradd does not
support features manages_passwords; not managing attribute password. *And i
can''t set password for *user1*
Ruby''s version is 1.8.6. Can you show me the way to set password for
users?
Thank in advance
Best regards
TungDH
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
did you install it both on the server and client? Ohad On Mon, Jul 7, 2008 at 12:12 PM, tung dang <danghuutung@gmail.com> wrote:> I can''t find ruby-shadow in the yum''s repository. I have installed > ruby-shadow-1.4.1-1.el4.rf.i386.rpm<http://rpm.pbone.net/index.php3/stat/4/idpl/6080585/com/ruby-shadow-1.4.1-1.el4.rf.i386.rpm.html>from > dag.wieers.com. But when i run puppet-client with the following code > * user {"user1": > provider => useradd, > gid => user1, > password => ''123456'', > ensure => present > } > *It will display the message *info: /User[user1]: Provider useradd does > not support features manages_passwords; not managing attribute password. *And > i can''t set password for *user1* > Ruby''s version is 1.8.6. Can you show me the way to set password for > users? > Thank in advance > Best regards > TungDH > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I have installed ruby-shadow on client. But i think it''s enough ( http://reductivelabs.com/trac/puppet/wiki/PuppetRedHatCentos). Maybe this problem derives from Ruby''s version or environment variable. I downgraded Ruby to 1.8.1 and it did not display the above error. Now everything is OK. Thanks everyone TungDH --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
As far as I''m aware (and please correct me if I''m wrong), you need it on both client and server. Ohad On Mon, Jul 7, 2008 at 3:27 PM, tung dang <danghuutung@gmail.com> wrote:> I have installed ruby-shadow on client. But i think it''s enough ( > http://reductivelabs.com/trac/puppet/wiki/PuppetRedHatCentos). Maybe this > problem derives from Ruby''s version or environment variable. I downgraded > Ruby to 1.8.1 and it did not display the above error. > Now everything is OK. > Thanks everyone > > TungDH > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''m a newbie with puppet. But i''m sure with this question, because my server doesn''t install ruby-shadow and it runs well Regards, TungDH --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi all, i have other question about this topic
I use puppet to install ruby-shadow and create user as following description
* package {"install1":
provider => "rpm",
source => "
http://192.168.15.53/repo/ruby-shadow-1.4.1-1.el4.rf.i386.rpm",
ensure => installed
}
user {"linux":
provider => useradd,
gid => linux,
require => package["install1"],
password =>
''$1$H8P38Vo9$X1ustdN/NdWRbCDDHksjX.'',
ensure => present,
}*
I want to install ruby-shadow before creating user and i use *require
*parameter.
But it''s still informs *info: /User[linux]: Provider useradd does not
support features manages_passwords; not managing attribute password
*In other case, i use *require *parameter and no matter. But in this case it
seems not ok. Whether i can install ruby-shadow and create user at the same
time as above or i must install ruby-shadow and create user in 2 separate
commands (First command to install ruby-shadow, second command to create
user)
Thank in advance
Regards
TungDH
*
*
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
2008/7/7 tung dang <danghuutung@gmail.com>:> Hi all, i have other question about this topic > I use puppet to install ruby-shadow and create user as following description > package {"install1": > provider => "rpm", > source => > "http://192.168.15.53/repo/ruby-shadow-1.4.1-1.el4.rf.i386.rpm", > ensure => installed > } > > user {"linux": > provider => useradd, > gid => linux, > require => package["install1"],require => Package["install1"], is the appropriate syntax - you should have had a warning in your puppetmaster logs that that syntax isn''t quite right. I just made the ruby-shadow package part of the base setup for all of our Linux machines. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I think, in this case it is different from other case. I think puppet-client will check the system before implement the manifest, it doesn''t find ruby-shadow, so it warns and can''t set password as i expected. Although that the order of manifest is still correct, but it can''t set password because it has checked before Do i understand right? Thank in advance TungDH --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
2008/7/7 tung dang <danghuutung@gmail.com>:> I think, in this case it is different from other case. I think puppet-client > will check the system before implement the manifest, it doesn''t find > ruby-shadow, so it warns and can''t set password as i expected. Although thatRunning puppetd --test --debug will confirm the order in which the client is executing statements, and give you empirical proof of how things are happening. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Don''t know if that helps, but I just used SHA hash and replaced old pass hash with new one with exec''ing sed. Works flawlessly. regards, Stanislaw On Jul 7, 12:32 pm, "Duncan Hill" <bajand...@googlemail.com> wrote:> 2008/7/7 tung dang <danghuut...@gmail.com>: > > > I think, in this case it is different from other case. I think puppet-client > > will check the system before implement the manifest, it doesn''t find > > ruby-shadow, so it warns and can''t set password as i expected. Although that > > Running puppetd --test --debug will confirm the order in which the > client is executing statements, and give you empirical proof of how > things are happening.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I don''t worry about the order to execute the manifest. But as i mention above, i think i can''t install ruby-shadow and create user with specific password (use *password *parameter) at the same time. I think it''s a feature of puppet (Puppet-client checks system before executing manifest) Can experts confirm for me about this trouble? Thank in advance TungDH --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
tung dang wrote:> I don''t worry about the order to execute the manifest. But as i mention > above, i think i can''t install ruby-shadow and create user with specific > password (use /password /parameter) at the same time. I think it''s a > feature of puppet (Puppet-client checks system before executing manifest) > Can experts confirm for me about this trouble?A clarification: you don''t set the password itself, you set the password hash. The contents of the password parameter get passed to the useradd command via the -p option. And yes, you have to have ruby-shadow installed on client and server in order to use the password option. -- Frank Sweetser fs at wpi.edu | For every problem, there is a solution that WPI Senior Network Engineer | is simple, elegant, and wrong. - HL Mencken GPG fingerprint = 6174 1257 129E 0D21 D8D4 E8A3 8E39 29E3 E2E8 8CEC --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> A clarification: you don''t set the password itself, you set the password > hash. The contents of the password parameter get passed to the useradd > command via the -p option.Yes, i understand> > And yes, you have to have ruby-shadow installed on client and server in > order > to use the password option.That means i can''t install ruby-shadow and use *password *option with only a command from client?* I can''t use the order to execute manifest to do that?* And i don''t think ruby-shadow is required on server, because my server did not install ruby-shadow and it runs well TungDH --~--~---------~--~----~------------~-------~--~----~ 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 can do something like this:
package { "ruby-shadow: ensure => present }
user { "test": require => Package[''ruby-shadow''],
}
You absolutely must have ruby-shadow installed on the client you want to set
the password on, but you don''t need it on the puppetmaster end.
Thanks,
On Tue, Jul 8, 2008 at 9:35 PM, tung dang <danghuutung@gmail.com> wrote:
>
> A clarification: you don''t set the password itself, you set the
password
>> hash. The contents of the password parameter get passed to the useradd
>> command via the -p option.
>
>
> Yes, i understand
>
>>
>> And yes, you have to have ruby-shadow installed on client and server in
>> order
>> to use the password option.
>
>
> That means i can''t install ruby-shadow and use *password *option
with only
> a command from client?* I can''t use the order to execute manifest
to do
> that?*
> And i don''t think ruby-shadow is required on server, because my
server did
> not install ruby-shadow and it runs well
>
> TungDH
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> tung dang wrote: <blockquote cite="mid:5ddf403d0807081835o567fa87cnd7d0da6282ca6f36@mail.gmail.com" type="cite"><br> <div class="gmail_quote"> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">A clarification: you don''t set the password itself, you set the password<br> hash. The contents of the password parameter get passed to the useradd<br> command via the -p option.</blockquote> <div><br> Yes, i understand<br> </div> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> And yes, you have to have ruby-shadow installed on client and server in order<br> to use the password option.</blockquote> <div><br> That means i can''t install ruby-shadow and use <i>password </i>option with only a command from client?<b> I can''t use the order to execute manifest to do that?</b><br> And i don''t think ruby-shadow is required on server, because my server did not install ruby-shadow and it runs well <br> </div> </div> </blockquote> <br> It''ll take *two* runs to get this kind of behaviour.<br> <br> The first run will install ruby-shadow.<br> <br> Second one will give you manages_password, and thus the ability to manage passwords.<br> <br> Regards,<br> <br> AJ<br> <br> --~--~---------~--~----~------------~-------~--~----~<br> You received this message because you are subscribed to the Google Groups "Puppet Users" group. <br> To post to this group, send email to puppet-users@googlegroups.com <br> To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com <br> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en <br> -~----------~----~----~----~------~----~------~--~---<br> </body> </html> <br>
On Wed, Jul 9, 2008 at 8:54 AM, Ashley Penney <apenney@gmail.com> wrote:> You can do something like this: > > package { "ruby-shadow: ensure => present } > user { "test": require => Package[''ruby-shadow''], } >I think we can''t do like that, because i have tested it (I said in the previous post) * It''ll take *two* runs to get this kind of behaviour. The first run will install ruby-shadow. Second one will give you manages_password, and thus the ability to manage passwords*. I also think like that. Thank to all of you for your help TungDH --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jul 8, 2008, at 8:54 PM, AJ wrote:> tung dang wrote: >> >> >> A clarification: you don''t set the password itself, you set the >> password >> hash. The contents of the password parameter get passed to the >> useradd >> command via the -p option. >> >> Yes, i understand >> >> And yes, you have to have ruby-shadow installed on client and >> server in order >> to use the password option. >> >> That means i can''t install ruby-shadow and use password option with >> only a command from client? I can''t use the order to execute >> manifest to do that? >> And i don''t think ruby-shadow is required on server, because my >> server did not install ruby-shadow and it runs well > > It''ll take *two* runs to get this kind of behaviour. > > The first run will install ruby-shadow. > > Second one will give you manages_password, and thus the ability to > manage passwords.If this is true, it''s a bug. Please file it. -- This book fills a much-needed gap. -- Moses Hadas --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---