LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 02-13-2003, 06:49 PM   #1
khutze
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
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
 
  


Reply


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 08:47 PM
Delete group users from /etc/passwd SCRIPT wesleywest Linux - General 5 03-08-2005 10:59 AM
restoring passwd/group files jhaiduce Fedora 1 10-20-2004 11:05 AM
Group Admin, Group Root, or God over Group crickett Linux - General 5 07-12-2004 05:01 PM
Trouble after copy shadow, group and passwd to ltsp server tapanga Linux - General 1 04-19-2004 01:59 PM


All times are GMT -5. The time now is 06:48 AM.

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