On Fri, 08 Jul 2005 18:41:49 +0800, Stephen Liu wrote:
> Hi folks,
>
> Continued on "6.3. Entering the Chroot Environment"
> http://www.sg.linuxfromscratch.org/...r06/chroot.html
>
> Performed following steps;
>
> # mount /mnt/lfs
> # export LFS=/mnt/lfs
> # mkdir -p $LFS/{proc,sys}
> # mount -t proc proc $LFS/proc
> # mount -t sysfs sysfs $LFS/sys
> # mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts
> all went through without problem
>
> # chroot "$LFS" /tools/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ '
> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin /tools/bin/bash --login +h
>
> I have no name!:/#
>
> Please advise how to proceed. Whether enter a name here? OR just ignore it
> and continue on "6.4. Changing Ownership"
>
> http://www.sg.linuxfromscratch.org/lfs/view/6.0/chapter06/changingowner.html
>
> TIA
>
> B.R.
> Stepphen Liu
get_current_user_info ()
{
struct passwd *entry;
/* Don't fetch this more than once. */
if (current_user.user_name == 0)
{
entry = getpwuid (current_user.uid);
if (entry)
{
current_user.user_name = savestring (entry->pw_name);
current_user.shell = (entry->pw_shell && entry->pw_shell[0])
? savestring (entry->pw_shell)
: savestring ("/bin/sh");
current_user.home_dir = savestring (entry->pw_dir);
}
else
{
current_user.user_name = _("I have no name!");
current_user.user_name = savestring (current_user.user_name);
current_user.shell = savestring ("/bin/sh");
current_user.home_dir = savestring ("/");
}
endpwent ();
}
}
getpwuid is in pwd.h which is included by shell.c
and that is why you get "I have no name!", which is mentioned at the end of
entering the chroot environment.
Change it to something funny. Something like "Fix your passwd file, bum!" orrr
"Creature from the Black Lagoon!"
William (Ratrophy)
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page