On Sat, Feb 23, 2008 at 9:42 AM, lanas <[EMAIL PROTECTED]> wrote: > Hello, > > There's an uncommon problem with trying to modify the root password at > the end of building a LFS 6.3 system. I'm sure this does not pertain > to LFS and something must be not quite right. I've never seen this > before. > > The passwd and shadow files are as per the book, and the pwconv and > grpconv utilities were run, as well as the sed and the useradd > modification (both part of the shadow install). > > I chroot into the freshly-built LFS system and then I issue the > 'passwd' command. But then all of the lines below appears as if I > typed something and then passwd exits. > > Changing password for root > Enter the new password (minimum of 5, maximum of 127 characters) > Please use a combination of upper and lower case letters and numbers. > Bad password: too short. > Warning: weak password (enter it again to use it anyway). > Password changed.
I think this comes down to a non-existent /dev/tty. passwd uses the getpass() function from libc, and it requires /dev/tty. Do you remember to bind mount /dev to $LFS/dev before chrooting? See here: http://linuxfromscratch.org/pipermail/lfs-support/2008-February/034065.html > Here's the chroot I use (Fedora 8 host system) (never mind the > colourful prompt ;-) > > /usr/sbin/chroot . /usr/bin/env -i \ > HOME=/root TERM="$TERM" \ > PS1='\e[99B---->\e[K \e[1;33m\u \e[33m \e[33m\w \e[33m\n' \ > PATH=/bin:/usr/bin:/sbin:/usr/sbin: \ > /bin/bash --login +h That's fine, but you also need to setup the /dev partition to have working devices in the chroot. See the last paragraph here: http://www.linuxfromscratch.org/lfs/view/6.3/chapter06/revisedchroot.html -- Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page