[opensuse-autoinstall] How to use <ask> statements in autoyast?
Hi I've been looking over the documentation for <ask> at http://newsportal.novell.com/article.php?id=1565&group=novell.support.sles.install-boot#1565 - but it leave's me with several questions (sorry for my ignorance, I'm new to all this autoyast stuff ;) ) - if I use the "<file>/tmp/answer_hostname</file>", what is the format of the answer file?? just an empty text file with the answer or? - what about the value to be exchanged? should it be empty, or will any predefined value be exchanged with the one asked for? - Will it be possible to answer serveral "paths" with the same question?? eg. below <ask> <path>arkmanager,dbpassword</path> <path>ca_mgm,password</path> <question>Type Password</question> <stage>initial</stage> <default>Type in your password here</default> </ask> or is there, a more clever solution to such a question? - How about the password... is it possible to get this read from an clear text string? (I'm installing OES2, and there are several passwords and some are written in clear text, and some ain't) regards Flemming (Terribly sorry if my post occurs twice, haven't noticed the no HTML part at first) -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Montag, 19. November 2007, Hougaard wrote:
- if I use the "<file>/tmp/answer_hostname</file>", what is the format of the answer file?? just an empty text file with the answer or?
it's a textfile with only the string of the answer. In case of a boolean it's "true" or "false" (without quotes), in case of textentries it's the exact string that was entered by the user.
- what about the value to be exchanged? should it be empty, or will any predefined value be exchanged with the one asked for?
does not matter. Empty or not, it will be replaced.
- Will it be possible to answer serveral "paths" with the same question?? eg. below
unfortunately not. That's a design bug I did there. I'll fix that in the future somehow without breaking compatibilty
<ask> <path>arkmanager,dbpassword</path> <path>ca_mgm,password</path> <question>Type Password</question> <stage>initial</stage> <default>Type in your password here</default> </ask>
or is there, a more clever solution to such a question?
with 10.3 you could change the profile via script but with OES2 there is no really clever solution other than write a script and do the changes to the system by yourself with it.
- How about the password... is it possible to get this read from an clear text string? (I'm installing OES2, and there are several passwords and some are written in clear text, and some ain't)
if you need the password in an encrypted way, then you have to <ask> the user to enter it encrypted (*haha* - good one) or you encrypt it via script and write it to the correct position in the system. -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug now playing The Retrosic - Quid pro Quo -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Thanks all ... but I can still pull out a couple of questions ;) My primary idea is to make a installpoint (nfs), where I PXE-boot and install the servers needed - so if I make a script adding the password to a file, could I do as follows? <ask> <path>arkmanager,dbpassword</path> <file>nfs://10.0.0.1/install/autoyast/answer_password</file> </ask> if the same answer is valid for 2 values in the same section (eg. locator_context & server_context both in the section group_context in novell-dhcp) do i need to make 2 answersection there, or will the following work? <ask> <path>novell-dhcp,group_context,locator_context,server_context</path> <file>nfs://10.0.0.1/install/autoyast/answer_password</file> </ask> Again - thanks Regards Flemming
Uwe Gansert <ug@suse.de> 19. november 2007 16:48:41 >>> On Montag, 19. November 2007, Hougaard wrote:
- if I use the "<file>/tmp/answer_hostname</file>", what is the format of the answer file?? just an empty text file with the answer or?
it's a textfile with only the string of the answer. In case of a boolean it's "true" or "false" (without quotes), in case of textentries it's the exact string that was entered by the user.
- what about the value to be exchanged? should it be empty, or will any predefined value be exchanged with the one asked for?
does not matter. Empty or not, it will be replaced.
- Will it be possible to answer serveral "paths" with the same question?? eg. below
unfortunately not. That's a design bug I did there. I'll fix that in the future somehow without breaking compatibilty
<ask> <path>arkmanager,dbpassword</path> <path>ca_mgm,password</path> <question>Type Password</question> <stage>initial</stage> <default>Type in your password here</default> </ask>
or is there, a more clever solution to such a question?
- How about the password... is it possible to get this read from an clear text string? (I'm installing OES2, and there are several
with 10.3 you could change the profile via script but with OES2 there is no really clever solution other than write a script and do the changes to the system by yourself with it. passwords
and some are written in clear text, and some ain't)
if you need the password in an encrypted way, then you have to <ask> the user to enter it encrypted (*haha* - good one) or you encrypt it via script and write it to the correct position in the system. -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug now playing The Retrosic - Quid pro Quo -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
I've tried to use the section below, but it seems that the file can't be found. Isn't it possible to point to a file on the installationshare? <ask> <path>arkmanager,dbpassword</path> <file>nfs://10.0.0.1/install/autoyast/answer_password</file> </ask> Regards Flemming -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Donnerstag, 29. November 2007, Hougaard wrote:
I've tried to use the section below, but it seems that the file can't be found. Isn't it possible to point to a file on the installationshare?
<ask> <path>arkmanager,dbpassword</path> <file>nfs://10.0.0.1/install/autoyast/answer_password</file> </ask>
that does not work. <file> can be only be a local file. -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
.. another dumb question... when I've made my autoyast file I used a VMWare machine - and the final result is to be used on both physical hardware and virtual machines - will the section below mess up my day, and make a bootloader that be kind of messy on physical hardware??? <bootloader> <device_map config:type="list"> <device_map_entry> <firmware>fd0</firmware> <linux>/dev/fd0</linux> </device_map_entry> <device_map_entry> <firmware>hd0</firmware> <linux>/dev/sda</linux> </device_map_entry> </device_map> <global> <activate>true</activate> <boot_boot>true</boot_boot> <default>SUSE Linux Enterprise Server 10 SP1</default> <gfxmenu>/boot/message</gfxmenu> <lines_cache_id>3</lines_cache_id> <timeout config:type="integer">8</timeout> </global> <initrd_modules config:type="list"> <initrd_module> <module>piix</module> </initrd_module> <initrd_module> <module>mptspi</module> </initrd_module> <initrd_module> <module>ide-generic</module> </initrd_module> <initrd_module> <module>processor</module> </initrd_module> <initrd_module> <module>thermal</module> </initrd_module> <initrd_module> <module>fan</module> </initrd_module> <initrd_module> <module>jbd</module> </initrd_module> <initrd_module> <module>ext3</module> </initrd_module> <initrd_module> <module>dm_mod</module> </initrd_module> <initrd_module> <module>edd</module> </initrd_module> </initrd_modules> <loader_type>grub</loader_type> <sections config:type="list"> <section> <append>resume=/dev/system/swap splash=silent showopts</append> <image>/boot/vmlinuz-2.6.16.46-0.12-default</image> <initial>1</initial> <initrd>/boot/initrd-2.6.16.46-0.12-default</initrd> <kernel>/boot/vmlinuz</kernel> <lines_cache_id>0</lines_cache_id> <name>SUSE Linux Enterprise Server 10 SP1</name> <original_name>linux</original_name> <root>/dev/system/system</root> <type>image</type> </section> <section> <blockoffset>1</blockoffset> <chainloader>/dev/fd0</chainloader> <lines_cache_id>1</lines_cache_id> <name>Floppy</name> <noverifyroot>true</noverifyroot> <original_name>floppy</original_name> <type>other</type> </section> <section> <append>showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off 3</append> <image>/boot/vmlinuz-2.6.16.46-0.12-default</image> <initrd>/boot/initrd-2.6.16.46-0.12-default</initrd> <kernel>/boot/vmlinuz</kernel> <lines_cache_id>2</lines_cache_id> <name>Failsafe -- SUSE Linux Enterprise Server 10 SP1</name> <original_name>failsafe</original_name> <root>/dev/system/system</root> <type>image</type> </section> </sections> </bootloader>
Uwe Gansert <ug@suse.de> 19. november 2007 16:48:41 >>> On Montag, 19. November 2007, Hougaard wrote:
- if I use the "<file>/tmp/answer_hostname</file>", what is the format of the answer file?? just an empty text file with the answer or?
it's a textfile with only the string of the answer. In case of a boolean it's "true" or "false" (without quotes), in case of textentries it's the exact string that was entered by the user.
- what about the value to be exchanged? should it be empty, or will any predefined value be exchanged with the one asked for?
does not matter. Empty or not, it will be replaced.
- Will it be possible to answer serveral "paths" with the same question?? eg. below
unfortunately not. That's a design bug I did there. I'll fix that in the future somehow without breaking compatibilty
<ask> <path>arkmanager,dbpassword</path> <path>ca_mgm,password</path> <question>Type Password</question> <stage>initial</stage> <default>Type in your password here</default> </ask>
or is there, a more clever solution to such a question?
- How about the password... is it possible to get this read from an clear text string? (I'm installing OES2, and there are several
with 10.3 you could change the profile via script but with OES2 there is no really clever solution other than write a script and do the changes to the system by yourself with it. passwords
and some are written in clear text, and some ain't)
if you need the password in an encrypted way, then you have to <ask> the user to enter it encrypted (*haha* - good one) or you encrypt it via script and write it to the correct position in the system. -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug now playing The Retrosic - Quid pro Quo -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Terrible sorry... I keep on... I know I should have collected my 3 mails in one - just keep discovering things in the autoyast file, promise I have no more questions to ask... for now ;) but in my earlier post I asked about how to put in an unencrypted password as I wan't to use the same answerfile for both the encrypted and non-encrypted password in the autoyast file - I think I was misunderstood, therefore I've brought an example of what I mean with the encrypted password: <user> <encrypted config:type="boolean">true</encrypted> <fullname>root</fullname> <gid>0</gid> <home>/root</home> <password_settings> <flag></flag> <inact>-1</inact> <max>99999</max> <min>0</min> <warn>7</warn> </password_settings> <shell>/bin/bash</shell> <uid>0</uid> <user_password>$2a$05$sHdD98OBVc8o0INAsKiwqe/WqjGedS9ukruP0/75fSpmfdldjALy</user_password> <username>root</username> </user> The string in <user_password> seems to me to be encrypted considering what I've typed in ;) In order to type in a clear textpassword, is it enough to set <encrypted config:type="boolean">false</encrypted> . . <user_password>mytopsecretpassword</user_password> ? Regards Flemming
Uwe Gansert <ug@suse.de> 19. november 2007 16:48:41 >>> On Montag, 19. November 2007, Hougaard wrote:
- if I use the "<file>/tmp/answer_hostname</file>", what is the format of the answer file?? just an empty text file with the answer or?
it's a textfile with only the string of the answer. In case of a boolean it's "true" or "false" (without quotes), in case of textentries it's the exact string that was entered by the user.
- what about the value to be exchanged? should it be empty, or will any predefined value be exchanged with the one asked for?
does not matter. Empty or not, it will be replaced.
- Will it be possible to answer serveral "paths" with the same question?? eg. below
unfortunately not. That's a design bug I did there. I'll fix that in the future somehow without breaking compatibilty
<ask> <path>arkmanager,dbpassword</path> <path>ca_mgm,password</path> <question>Type Password</question> <stage>initial</stage> <default>Type in your password here</default> </ask>
or is there, a more clever solution to such a question?
- How about the password... is it possible to get this read from an clear text string? (I'm installing OES2, and there are several
with 10.3 you could change the profile via script but with OES2 there is no really clever solution other than write a script and do the changes to the system by yourself with it. passwords
and some are written in clear text, and some ain't)
if you need the password in an encrypted way, then you have to <ask> the user to enter it encrypted (*haha* - good one) or you encrypt it via script and write it to the correct position in the system. -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug now playing The Retrosic - Quid pro Quo -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Tuesday 20 November 2007 05:39, Hougaard wrote:
Terrible sorry... I keep on... I know I should have collected my 3 mails in one - just keep discovering things in the autoyast file, promise I have no more questions to ask... for now ;)
but in my earlier post I asked about how to put in an unencrypted password as I wan't to use the same answerfile for both the encrypted and non-encrypted password in the autoyast file - I think I was misunderstood, therefore I've brought an example of what I mean with the encrypted password:
I don't quite follow your example, but you seem to have similar problems to what I had. I collect all the answers from the ask section, and the put them into one file with a chroot script. The init script then makes use of them. Take a look a the presentation examples in the brainshare presentation I did. linked from http://www.suse.com/~ug/presentations/index.html or an example on the opensuse wiki. http://en.opensuse.org/AutoYaST There's an example script that copies the answers into the newly installed system and some other stuff too. Some of the scripts aren't too easy to follow, so ask if you have any questions on them. In answer to you question on boot loaders, if you do have problems with different hardware, you could use different bootloader sections with different ethernet mac addresses via include files. There's an example on the wiki about that too. -- Simon Crute IS&T. Bracknell. UK. -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (3)
-
Hougaard
-
Simon Crute
-
Uwe Gansert