From robert.munteanu@gmail.com Thu Jul 31 15:12:26 2014 From: Robert Munteanu To: autoinstall@lists.opensuse.org Subject: [opensuse-autoinstall] [13.1] Creating a file in the user's home Date: Thu, 31 Jul 2014 18:12:23 +0300 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1194375219347233526==" --===============1194375219347233526== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, As part of my autoinst.xml file I want to place a file in a specific user's home. Initially I tried to do it with a post-script, but that failed since the user's home was not yet created I also tried using files/file section, but that seemed be completely ignored. According to [1] this should work without any issues in 13.1. /home/vagrant/.ssh/authorized_keys vagrant 600 I tried both the file_contents and file_location variants ( one is commented out above ). What's the best way of placing a file in the user's home directory using autoinst.xml ? Thanks, Robert [1]: http://doc.opensuse.org/projects/autoyast/configuration.html#createprofi= le.completeconf --=20 http://robert.muntea.nu/ --=20 To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe(a)opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner(a)opensuse.org --===============1194375219347233526==-- From robert.munteanu@gmail.com Thu Jul 31 15:39:21 2014 From: Robert Munteanu To: autoinstall@lists.opensuse.org Subject: [opensuse-autoinstall] Re: [13.1] Creating a file in the user's home Date: Thu, 31 Jul 2014 18:39:18 +0300 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0578003888835388376==" --===============0578003888835388376== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Thu, Jul 31, 2014 at 6:12 PM, Robert Munteanu wrote: > > I noticed that this should be , but again, it did not make a difference. I was able to create a file under /etc , but not under /home/vagrant/.ssh . Is there an alternative to creating all the intermediate directories? Thanks, Robert -- http://robert.muntea.nu/ -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe(a)opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner(a)opensuse.org --===============0578003888835388376==-- From fehr@suse.de Thu Jul 31 15:59:30 2014 From: Thomas Fehr To: autoinstall@lists.opensuse.org Subject: Re: [opensuse-autoinstall] [13.1] Creating a file in the user's home Date: Thu, 31 Jul 2014 17:59:29 +0200 Message-ID: <20140731155929.GB23960@suse.de> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6021895313381503658==" --===============6021895313381503658== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, On Thu, Jul 31, Robert Munteanu wrote: > Hi, >=20 > As part of my autoinst.xml file I want to place a file in a specific > user's home. Initially I tried to do it with a post-script, but that > failed since the user's home was not yet created I assume you create the user as part of the section in autoinst.xml . post-scripts are called before second stage configuration (like e.g. creating users) are done so the user and its home dir does not yet exist. Solutions: 1) You could use a init-script, it is run after all configuration is done=20 and all services are up and running 2) you create the user via a call to useradd in the post-script before putting the file into its home directory. In this case the user should be removed = from section in autoinst.xml Bye,=20 Thomas Fehr --=20 Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germ= any GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer, HRB 16746 (AG N=C3= =BCrnberg) Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: fehr(a)suse.de GPG public key available. --=20 To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe(a)opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner(a)opensuse.org --===============6021895313381503658==-- From robert.munteanu@gmail.com Thu Jul 31 20:41:37 2014 From: Robert Munteanu To: autoinstall@lists.opensuse.org Subject: Re: [opensuse-autoinstall] [13.1] Creating a file in the user's home Date: Thu, 31 Jul 2014 23:41:34 +0300 Message-ID: In-Reply-To: <20140731155929.GB23960@suse.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5992923452948695921==" --===============5992923452948695921== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Thu, Jul 31, 2014 at 6:59 PM, Thomas Fehr wrote: > Hi, > > On Thu, Jul 31, Robert Munteanu wrote: > >> Hi, >> >> As part of my autoinst.xml file I want to place a file in a specific >> user's home. Initially I tried to do it with a post-script, but that >> failed since the user's home was not yet created > > I assume you create the user as part of the section in autoinst.xml= . > post-scripts are called before second stage configuration (like e.g. creati= ng > users) are done so the user and its home dir does not yet exist. > > Solutions: > 1) You could use a init-script, it is run after all configuration is done > and all services are up and running A init-script worked perfectly, thank you. Robert > 2) you create the user via a call to useradd in the post-script before putt= ing > the file into its home directory. In this case the user should be removed > from section in autoinst.xml > > Bye, > Thomas Fehr > -- > Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Ge= rmany > GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer, HRB 16746 (AG N=C3= =BCrnberg) > Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: fehr(a)suse.de > GPG public key available. > -- > To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe(a)opensuse.org > To contact the owner, e-mail: opensuse-autoinstall+owner(a)opensuse.org > --=20 http://robert.muntea.nu/ --=20 To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe(a)opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner(a)opensuse.org --===============5992923452948695921==--