Having just spent about 2 hours trying to work out how to add a password --md5 $1$Qejy8/$.qFUuDeYL.cuSDpN1ZD.S1 line to my grub.conf I thought it would be worth sharing how I finally got it to work. augeas {"/boot/grub/grub.conf": context => "/files/boot/grub/grub.conf", changes => [ "set timeout 15", ''set password/md5 null'', ''set password $1$Qejy8/$.qFUuDeYL.cuSDpN1ZD.S1'' ] } Also the grub lens only works if /boot/grub/grub.conf resides on the same file system as /etc otherwise augtool craps out with an error about being unable to save a cross file system link. Short of editing the lens file, I''m not sure how to solve that one. If anyone knows how to fix that without the edit then that would be great :) -- Trevor Hemsley Infrastructure Engineer ................................................. * C A L Y P S O * Brighton, UK OFFICE +44 (0) 1273 666 350 FAX +44 (0) 1273 666 351 ................................................. www.calypso.com This electronic-mail might contain confidential information intended only for the use by the entity named. If the reader of this message is not the intended recipient, the reader is hereby notified that any dissemination, distribution or copying is strictly prohibited. * P * /*/ Please consider the environment before printing this e-mail /*/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
+1 for that. I did the same thing last week. I ended up editing the grub.conf lens. If there is a way to override the ''incl'' directives or point augeas at a specific file and tell it to use a specific lens, I''d like to hear it as well. On Fri, Jul 31, 2009 at 12:07 PM, Trevor Hemsley<trevor.hemsley@codefarm.com> wrote:> > Having just spent about 2 hours trying to work out how to add a > > password --md5 $1$Qejy8/$.qFUuDeYL.cuSDpN1ZD.S1 > > line to my grub.conf I thought it would be worth sharing how I finally > got it to work. > > augeas {"/boot/grub/grub.conf": > context => "/files/boot/grub/grub.conf", > changes => [ "set timeout 15", > ''set password/md5 null'', > ''set password > $1$Qejy8/$.qFUuDeYL.cuSDpN1ZD.S1'' > ] > } > > Also the grub lens only works if /boot/grub/grub.conf resides on the > same file system as /etc otherwise augtool craps out with an error about > being unable to save a cross file system link. Short of editing the lens > file, I''m not sure how to solve that one. If anyone knows how to fix > that without the edit then that would be great :) > > -- > > Trevor Hemsley > Infrastructure Engineer > ................................................. > * C A L Y P S O > * Brighton, UK > > OFFICE +44 (0) 1273 666 350 > FAX +44 (0) 1273 666 351 > > ................................................. > www.calypso.com > > This electronic-mail might contain confidential information intended > only for the use by the entity named. If the reader of this message is > not the intended recipient, the reader is hereby notified that any > dissemination, distribution or copying is strictly prohibited. > > * P * /*/ Please consider the environment before printing this e-mail /*/ > > > > >-- Chad M. Huneycutt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chad Huneycutt wrote:> +1 for that. I did the same thing last week. I ended up editing the > grub.conf lens. If there is a way to override the ''incl'' directives > or point augeas at a specific file and tell it to use a specific lens, > I''d like to hear it as well.You can use the load_path property to point to a different set of lenses from the default. This maps to the LOADPATH parameter on augeas open [1]. If you have issues with this, please let me know. -- bk [1] http://www.augeas.net/docs/api.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Trevor Hemsley wrote:> Having just spent about 2 hours trying to work out how to add a > > password --md5 $1$Qejy8/$.qFUuDeYL.cuSDpN1ZD.S1 > > line to my grub.conf I thought it would be worth sharing how I finally > got it to work. > > augeas {"/boot/grub/grub.conf": > context => "/files/boot/grub/grub.conf", > changes => [ "set timeout 15", > ''set password/md5 null'', > ''set password > $1$Qejy8/$.qFUuDeYL.cuSDpN1ZD.S1'' > ] > } > > Also the grub lens only works if /boot/grub/grub.conf resides on the > same file system as /etc otherwise augtool craps out with an error about > being unable to save a cross file system link. Short of editing the lens > file, I''m not sure how to solve that one. If anyone knows how to fix > that without the edit then that would be great :) >Can you post this over on the augeas list[1]? Thanks! [1] http://www.augeas.net/developers.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Well, I just dropped the lenses in /usr/share/augeas/lenses, which I assume is on the load path higher than /usr/share/augeas/lenses/dist, where all of the other lenses are. But should I have to do that? Maybe we can pick up the discussion on the augeas list. - Chad On Mon, Aug 3, 2009 at 8:57 AM, Bryan Kearney<bkearney@redhat.com> wrote:> > Chad Huneycutt wrote: >> +1 for that. I did the same thing last week. I ended up editing the >> grub.conf lens. If there is a way to override the ''incl'' directives >> or point augeas at a specific file and tell it to use a specific lens, >> I''d like to hear it as well. > > You can use the load_path property to point to a different set of lenses > from the default. This maps to the LOADPATH parameter on augeas open > [1]. If you have issues with this, please let me know. > > -- bk > > > [1] http://www.augeas.net/docs/api.html > > > >-- Chad M. Huneycutt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
There was a bug in the previous incarnation anyway. augeas {"/boot/grub/grub.conf": context => "/files/boot/grub/grub.conf", changes => [ "set timeout 15", ''rm password'', ''ins password after timeout'', ''set password/md5 null'', ''set password $1$Qejy8/$.qFUuDeYL.cuSDpN1ZD.S1'' ] } It seems that grub helpfully ignores the password line if it appears after the image lines :( Bryan Kearney wrote:> Trevor Hemsley wrote: > >> Having just spent about 2 hours trying to work out how to add a >> >> password --md5 $1$Qejy8/$.qFUuDeYL.cuSDpN1ZD.S1 >> >> line to my grub.conf I thought it would be worth sharing how I finally >> got it to work. >> >> augeas {"/boot/grub/grub.conf": >> context => "/files/boot/grub/grub.conf", >> changes => [ "set timeout 15", >> ''set password/md5 null'', >> ''set password >> $1$Qejy8/$.qFUuDeYL.cuSDpN1ZD.S1'' >> ] >> } >> >> Also the grub lens only works if /boot/grub/grub.conf resides on the >> same file system as /etc otherwise augtool craps out with an error about >> being unable to save a cross file system link. Short of editing the lens >> file, I''m not sure how to solve that one. If anyone knows how to fix >> that without the edit then that would be great :) >> >> > Can you post this over on the augeas list[1]? Thanks! >Done -- Trevor Hemsley Infrastructure Engineer ................................................. * C A L Y P S O * Brighton, UK OFFICE +44 (0) 1273 666 350 FAX +44 (0) 1273 666 351 ................................................. www.calypso.com This electronic-mail might contain confidential information intended only for the use by the entity named. If the reader of this message is not the intended recipient, the reader is hereby notified that any dissemination, distribution or copying is strictly prohibited. * P * /*/ Please consider the environment before printing this e-mail /*/ --~--~---------~--~----~------------~-------~--~----~ 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 Fri, 2009-07-31 at 17:07 +0100, Trevor Hemsley wrote:> Also the grub lens only works if /boot/grub/grub.conf resides on the > same file system as /etc otherwise augtool craps out with an error about > being unable to save a cross file system link. Short of editing the lens > file, I''m not sure how to solve that one. If anyone knows how to fix > that without the edit then that would be great :)You can tell Augeas to copy files if it can''t move them by setting /augeas/save/copy_if_rename_fails to an arbitrary value, i.e. put set /augeas/save/copy_if_rename_fails something as the first thing into your changes. Obviously, this needs to be documented somewhere ;) The reason that Augeas doesn''t fall back to copying by default is that copying is a lot riskier than write to temp file + move (as in: you can end up with a completely garbled config file if the power fails at the wrong moment). You can always override any file that is shipped with Augeas by putting a file with the same name into /usr/share/augeas/lenses (the default lenses live in /usr/share/augeas/lenses/dist) David --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Maybe Matching Threads
- Re: [PATCH] daemon: augeas: filter out AUG_NO_STDINC from aug-init (RHBZ#1144927)
- [PATCH] daemon: augeas: filter out AUG_NO_STDINC from aug-init (RHBZ#1144927)
- Augeas lens for zabbix agent config files?
- [PATCH] daemon: Remove custom Augeas lenses.
- Converting augeas snippet to puppet augeas resource