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 do 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 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" root:x:0: bin:x:1: sys:x:2: kmem:x:3: tty:x:4: tape:x:5: daemon:x:6: floppy:x:7: disk:x:8: lp:x:9: dialout:x:10: audio:x:11: 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 bash-2.05a# 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 \ --oldincludedir=/mnt/lfs/usr/include 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/libshadow.so /usr/sbin/pwconv So I tried changing root passwd bash-2.05a# passwd root passwd: Cannot determine your user name. bash-2.05a# bash-2.05a# /usr/bin/login Unable to determine your tty name. bash-2.05a# 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? do Thanks in advance gerard |
All times are GMT -5. The time now is 07:04 AM. |