You are not logged in.
Pages: 1
Hi,
I've been playing with archiso for a while now and I had it all working before, then arch went through some drastic changes and now I have an issue.
I followed the wiki and everything works fine, I have LXDM automatically log in the user I created and load openbox, but the rc.local script the wiki says to make...
# Create the user directory for live session
if [ ! -d /home/youruser ]; then
mkdir /home/youruser && chown youruser /home/youruser
fi
# Copy files over to home
su -c "cp -r /etc/skel/.[a-zA-Z0-9]* /home/youruser/" youruser...copies the files I want in my home directory to the home directory of a user called 'arch', who I never created
The build.sh file used to build the archiso has this section
# Customize installation (root-image)
make_customize_root_image() {
if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then
cp -af ${script_path}/root-image ${work_dir}
cp -aT ${work_dir}/root-image/etc/skel/ ${work_dir}/root-image/root/
ln -sf /usr/share/zoneinfo/UTC ${work_dir}/root-image/etc/localtime
chmod 750 ${work_dir}/root-image/etc/sudoers.d
chmod 440 ${work_dir}/root-image/etc/sudoers.d/g_wheel
mkdir -p ${work_dir}/root-image/etc/pacman.d
wget -O ${work_dir}/root-image/etc/pacman.d/mirrorlist 'https://www.archlinux.org/mirrorlist/?country=all&protocol=http&use_mirror_status=on'
lynx -dump -nolist 'https://wiki.archlinux.org/index.php/Installation_Guide?action=render' >> ${work_dir}/root-image/root/install.txt
sed -i "s/#Server/Server/g" ${work_dir}/root-image/etc/pacman.d/mirrorlist
patch ${work_dir}/root-image/usr/bin/pacman-key < ${script_path}/pacman-key-4.0.3_unattended-keyring-init.patch
sed -i 's/#\(en_US\.UTF-8\)/\1/' ${work_dir}/root-image/etc/locale.gen
mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \
-r 'locale-gen' \
run
mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \
-r 'usermod -s /bin/zsh root' \
run
mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \
-r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" -s /bin/zsh arch' \
run
: > ${work_dir}/build.${FUNCNAME}
fiwhich features the line "-r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" -s /bin/zsh arch' \", which is where the 'arch' user i mentioned earlier comes from. I have tried editing this so that it makes my user for me but I think I did it wrong or I wasn't supposed to do it, either way it didn't work
Does anyone have any idea what I'm doing wrong?
Intel i5-6500 / nvidia GTX 960 / Gigabyte GA-Z170X-Gaming 3 EU Motherboard / 8gb RAM / i3 wm
Offline
I would say the rc.local is not required in your case. The routine you quoted copies everything from the folder root-image to the customized environment and creates the arch user as the final step. So if you placed your skel files in root-image/etc/skel (relative to build.sh) then the skel files will be respected by useradd.
EDIT: Are you using the archiso build script or do you create the live medium by hand as described on the wiki? In either case, I would place skel files into the chroot and create the user afterwards as it is done in the archiso script.
Last edited by bzt (2012-08-22 12:45:24)
Offline
I am using the archiso build script
I am not using the chroot method; I am following the method described in the wiki
Should i forget the rc.local and attempt to modify the useradd command in the build.sh script so that it creates the user I want it to?
I am trying to create a livecd with no intention to install it, just to use as a live medium, so I want everything to be done during the build process
thanks for the help
Intel i5-6500 / nvidia GTX 960 / Gigabyte GA-Z170X-Gaming 3 EU Motherboard / 8gb RAM / i3 wm
Offline
How did you edit it exactly? You're quoting only part of the command line from the script, right?
mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" -s /bin/zsh arch' runis the command line.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I can't remember exactly but I did something like this (my user is to be called 'student', have password 'maths' and be a member of more groups)
mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -r 'useradd -m -p "maths" -g users -G "audio,games,log,lp,optical,power,scanner,storage,video,wheel" -s /bin/zsh student' runwith the hope of having the build script create my user for me and then copy the files over, but to be honest I don't know what the first half of that command actually does, my scripting skills are almost non-existent
Do you think this would work? I may have done something wrong last time I tried it
Intel i5-6500 / nvidia GTX 960 / Gigabyte GA-Z170X-Gaming 3 EU Motherboard / 8gb RAM / i3 wm
Offline
I'm not sure you can set the password like that. See the man page for useradd which suggests you need to pass the encrypted password (but then goes on to say something ambiguous sounding so I'm really not sure).
Do all of those groups exist at this point?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Pages: 1