Good evening- lh build is not creating (by default) a regular username: user
I have had to follow instructions at ( http://wiki.debian.org/DebianLive/FAQ#Q.3AWhatistheroot.2BAC8-userpassword.3F ): Q: How do I change root or any user password? A: Add a chroot local hook script to change root or any user password each time you build an image. e.g. config/chroot_local-hooks/01-update_password.sh to set root password to "nopasswd" ------------------------------------------------------------------------ #!/bin/sh echo "I: update password" echo "root:nopasswd" | chpasswd --------------------------------------------------------------------- $ chmod +x config/chroot_local-hooks/01-update_password.sh because the directory: "live-bottom" nor file: "10adduser" in the subsequent instructions do not even exist: /usr/share/initramfs-tools/scripts/live-bottom /usr/share/initramfs-tools/scripts/live-bottom/10adduser ------------------------------------------------------------------------------------------------------------ mkdir -p config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/ cp /usr/share/initramfs-tools/scripts/live-bottom/10adduser config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/ ------------------------------------------------------------------------------------------------------------ Then edit the config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/10adduser and paste in the new user_crypted password that you make with echo "newlivepass" | mkpasswd -s . Or add an hook file in config/chroot_local-hooks/ with something like the below: ---------------------------------------------------------------------------------------------------------------------------------------- #!/bin/sh # Change the autogenerated user password to "debianlive" plain_password="debianlive" password=$(echo "${plain_password}" | mkpasswd -s) sed -i -e 's/\(user_crypted=\)\(.*\)\( #.*\)/\1\"'${password}'\"\3/' /usr/share/initramfs-tools/scripts/live-bottom/10adduser update-initramfs -tu -kall --------------------------------------------------------------------------------------------------------------------------------------------------------- The latter (hook model) could be more future proof than the former solution since it modifies just one string selectively but it requires the package "whois" to be installed on the target system (for mkpasswd) or that you generate the $password string not at build time and include it crypted in the above script. Best Professional Regards. -- Jose R R http://www.metztli-it.com --------------------------------------------------------------------------------------------- IBM Lotus Symphony supported on GNU/Linux, Mac OS, and Windows. --------------------------------------------------------------------------------------------- Daylight Saving Time in USA & Canada starts: Sunday 08 March 2010 --------------------------------------------------------------------------------------------- -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]
