Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-13-2003, 05:49 PM   #1
LQ Newbie
Registered: Jul 2002
Posts: 13

Rep: Reputation: 0
passwd group, what else do I need?

Trying to build a minimum system but can't logon. So I just installed the programs I thought could log me on from chroot
sysvinit bash maybe shadow to confirm anyway heres waht I done

# installing filesystem

cd /mnt/lfs &&
mkdir -p bin boot dev/pts etc/opt home lib mnt proc root sbin tmp var opt &&
for dirname in /mnt/lfs/usr /mnt/lfs/usr/local
mkdir $dirname
cd $dirname
mkdir bin etc include lib sbin share src
ln -s share/man
ln -s share/doc
ln -s share/info
cd $dirname/share
mkdir dict doc info locale man nls misc terminfo zoneinfo
cd $dirname/share/man
mkdir man{1,2,3,4,5,6,7,8}
done &&
cd /mnt/lfs/var &&
mkdir -p lock log mail run spool tmp opt cache lib/misc local &&
cd /mnt/lfs/opt &&
mkdir bin doc include info lib man &&
cd /mnt/lfs/usr &&
ln -s ../var/tmp

cd /mnt/lfs &&
chmod 0750 root &&
chmod 1777 tmp var/tmp

# installing bash

rm -fr /usr/src/bash-2.05b
cd /usr/src
bzcat /mnt/data/new-lfs/src/bash-2.05a.tar.bz2 | tar xv
cd bash-2.05a
./configure --enable-static-link \
--target=i586 --with-curses \
--prefix=/mnt/lfs/usr --bindir=/mnt/lfs/bin
make install

cd /mnt/lfs/bin &&
ln -sf bash sh
rm -fr /usr/src/bash-2.05b

cd /mnt/lfs/bin &&
ln -sf bash sh

# setting up, passwd group files

echo "root::0:0:root:/root:/bin/bash" > /mnt/lfs/etc/passwd

cat > /mnt/lfs/etc/group << "EOF"

# installing sysvinit

rm -fr /usr/src/sysvinit-2.84
cd /usr/src
bzcat /mnt/data/new-lfs/src/sysvinit-2.84.tar.bz2 | tar xv
cd /usr/src/sysvinit-2.84/src/
make -e LDFLAGS=-static
ROOT=/mnt/lfs make install
rm -fr /usr/src/sysvinit-2.83

cd /mnt/lfs/sbin
ln -s agetty getty

So I try to login using sulogin
su login complains about passwd
but lets me login with -e

Entered chroot enviourment

# chroot /mnt/lfs
bash-2.05a# sulogin
sulogin: cannot open password database!
bash-2.05a# sulogin -e

exit chroot enviuorment
Sulogin didn't work first time so tried sulogin -e
gave me a shell. So I thought cool I'm logged in as root so I install shadow with the following

rm -fr /usr/src/shadow-4.0.3
cd /usr/src
bzcat /mnt/data/new-lfs/src/shadow-4.0.3.tar.bz2 | tar xv
cd shadow-4.0.3

./configure --target=i586 \
--disable-nls --prefix=/mnt/lfs/usr \
make -e LDFLAGS=-all-static
make install

cd etc
cp -f limits login.access /mnt/lfs/etc
sed 's%/mnt/lfs/var/spool/mail%/mnt/lfs/var/mail%' login.defs.linux > /mnt/lfs/etc/login.defs
cd /mnt/lfs/usr/sbin
ln -sf vipw vigr
cd /mnt/lfs/usr/lib
ln -s ../../lib/


So I tried changing root passwd

bash-2.05a# passwd root
passwd: Cannot determine your user name.

bash-2.05a# /usr/bin/login
Unable to determine your tty name.

Can't figure it out are there more files need than the passwd and group files,
Does passwd and sulogin dependant onother programs (dependencies). I thought sulogin would
check passwd and group then login. Seems like its a bit more complicated. Both programs are static ie
ldd passwd
not a dynamic executable
must be a dependency problem or some config file I'm not aware of.
If so what are the minimum config files needed to log on root?

Thanks in advance


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/passwd, /etc/shadow, /etc/group? Educate me :)! nutnut Linux - General 4 06-11-2005 07:47 PM
Delete group users from /etc/passwd SCRIPT wesleywest Linux - General 5 03-08-2005 09:59 AM
restoring passwd/group files jhaiduce Fedora 1 10-20-2004 10:05 AM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 04:01 PM
Trouble after copy shadow, group and passwd to ltsp server tapanga Linux - General 1 04-19-2004 12:59 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration