Fedora Linux Support Community & Resources Center
  #1  
Old 26th May 2012, 08:30 PM
lovyagin Offline
Registered User
 
Join Date: Jul 2009
Posts: 116
linuxfirefox
Adding files to home directory of liveCD

I'm going to create a liveCD and trying to put files into home directory. However, if I just try do it at %post script of kickstart file, I see there is no /home/liveuser directory during script execution at all. Attempt to create in manually fails because root become owner of all files. Adding "chown liveuser:liveuser ..." fails too, sine there is no liveuser in host system.

What is "legal" way to add files into liveCD liveuser's home directory? Modify configurations files/profiles/autostart/etc?

Also I can't force mdm (aka folk of gnome2's gdm) to prompt for liveuser's password, even if I turn autologin off. When one clicks liveuser user name, it login in immediately with no chance to change user's language. Is there a way to force gdm to ask a password even if user have an empty one?
Reply With Quote
  #2  
Old 26th May 2012, 09:08 PM
AndrewSerk Offline
Registered User
 
Join Date: Oct 2010
Posts: 889
linuxfirefox
Re: Adding files to home directory of liveCD

Hi lovyagin,
You can add a file to the livecd by putting the file to add in the same directory/folder as the kickstart you are building from and add somethin like the following to the "%post nochroot" section of the kickstart.

Code:
##############################################################################
## POST --NOCHROOT
##############################################################################
%post --nochroot
##copy somefile to livecd default users home dir
cp somefile $INSTALL_ROOT/home/liveuser/
To set a user password you can add "pw=any_password" to the kernel line. That will set password for user and root. If you want to add this kernel line from the kickstart, add something like this toward the top of your kickstart.
Code:
bootloader --append="pw=any_password"
Hope this helps,
Reply With Quote
  #3  
Old 27th May 2012, 08:37 AM
lovyagin Offline
Registered User
 
Join Date: Jul 2009
Posts: 116
linuxfirefox
Re: Adding files to home directory of liveCD

Hi AndrewSerk!

Will liveuser be an owner of home directory and copied files after running such %post --nochroot script?

And, sorry, I'm not going to set any password, I just want gdm/mgm to ask for a password although it is empty.

Last edited by lovyagin; 27th May 2012 at 09:44 AM.
Reply With Quote
  #4  
Old 27th May 2012, 07:52 PM
AndrewSerk Offline
Registered User
 
Join Date: Oct 2010
Posts: 889
linuxfirefox
Re: Adding files to home directory of liveCD

Quote:
Originally Posted by lovyagin View Post
Hi AndrewSerk!

Will liveuser be an owner of home directory and copied files after running such %post --nochroot script?

And, sorry, I'm not going to set any password, I just want gdm/mgm to ask for a password although it is empty.
Yes, the liveuser will own the files copied to /home/liveuser . (at least that is how it works here) If you have a issue along those lines you could always use something like "chmod 755" to give the file the permissions you want.


The user and password are set in the fedora-live-base.ks with the lines:
Code:
# add fedora user with no passwd
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
passwd -d liveuser > /dev/null
You may be able to change the last line to something that would allow you to enter a new password every login but I am not sure how to do that.

I see from your first post you may want to use a different language. If you want to set a different default language,keyboard and time zone for the livecd you can do that in the fedora-live-base.ks by changing the following lines that appear at the top of the .ks .
Code:
lang en_US.UTF-8
keyboard us
timezone US/Eastern

Hope this helps,
Reply With Quote
  #5  
Old 8th January 2014, 02:49 AM
HallLinux Offline
Registered User
 
Join Date: Jan 2014
Location: Louisville
Posts: 1
linuxfirefox
Re: Adding files to home directory of liveCD

The correct concept is on this page, however the WRONG destination is listed.

The destination is not /home, in fact the documentation states to not use home like you would typically think. You actually need to copy whatever files you want to - $INSTALL_ROOT/etc/skel



HERE IS A SAMPLE FROM ONE WORKING .KS file I use
%post --nochroot
cp -r /home/owner/a/* $INSTALL_ROOT/etc/skel



I love linux! Keeping working at your .ks file and you will get it working.



.

Last edited by HallLinux; 8th January 2014 at 02:55 AM.
Reply With Quote
Reply

Tags
adding, directory, files, home, home directory, livecd

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
livecd-creator, kickstart files, adding files to /home directory. I.E. software dedic Bastian123 Installation, Upgrades and Live Media 7 24th March 2011 11:00 AM


Current GMT-time: 03:14 (Saturday, 01-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Dzyarzhynsk Photos on Instagram - Geoktschai Instagram Photos - Schio Instagram Photos