So I''m trying to add two users to ~700 machines running puppet-0.24.4 (Puppetmaster server is also running 0.24.4) I can get puppet to add the user, or make the home directory, but I can''t get it to set the password (I Don''t want to push out an /etc/ shadow file as not every location is 100% the same, and I can''t push out an /etc/passwd file either as not every machine has the exact same UID/GID combination for the local users, and then I''d have to deal with cleaning up permissions on directories, etc. and that could get really ugly - especially for the puppet user) I tried using some code that would insert a line into a file (/etc/ shadow in this case) but it doesn''t seem to always work, which is weird. Am I missing something obvious here? useradd in solaris doesn''t have an option to set the password via the useradd command? Thanks so much, Josh --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Mike Renfro
2009-Jan-30 19:51 UTC
[Puppet Users] Re: How to add users in Solaris via puppet
On 1/30/2009 11:11 AM, josh wrote:> Am I missing something obvious here? useradd in solaris doesn''t have > an option to set the password via the useradd command?Do you need a literal password for ''su'' or direct login purposes? Can you get around it with either sudo or with authorized ssh identities? Other than that, I suppose you could manage with something like a sed/awk/perl/whatever script to find the user''s line and replace their password field. http://www.tek-tips.com/viewthread.cfm?qid=1348695&page=7 has one of those, dated ''19 Apr 07 6:40''. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Andrew Shafer
2009-Jan-30 20:37 UTC
[Puppet Users] Re: How to add users in Solaris via puppet
Josh, The useradd provider doesn''t support setting passwords without ruby libshadow on any platform. In 0.24.7, there is a user_role_add provider for Solaris that can set hashed passwords and also manage Solaris RBAC. You could upgrade, or you could try just patching it in. (I think you need the provider, a patch to user type, and a utility file to handle the user attributes for RBAC.) Cheers, Andrew On Fri, Jan 30, 2009 at 10:11 AM, josh <dorqus@gmail.com> wrote:> > So I''m trying to add two users to ~700 machines running puppet-0.24.4 > (Puppetmaster server is also running 0.24.4) > > I can get puppet to add the user, or make the home directory, but I > can''t get it to set the password (I Don''t want to push out an /etc/ > shadow file as not every location is 100% the same, and I can''t push > out an /etc/passwd file either as not every machine has the exact same > UID/GID combination for the local users, and then I''d have to deal > with cleaning up permissions on directories, etc. and that could get > really ugly - especially for the puppet user) > > I tried using some code that would insert a line into a file (/etc/ > shadow in this case) but it doesn''t seem to always work, which is > weird. > > Am I missing something obvious here? useradd in solaris doesn''t have > an option to set the password via the useradd command? > > Thanks so much, > Josh > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---