hans kaper wrote:
> Op Fri, 04 Oct 2013 17:13:50 +0200 schreef Bruce Dubbs
> <[email protected]>:
>
>> hans kaper wrote:
>>> Op Thu, 03 Oct 2013 23:04:51 +0200 schreef William Harrington
>>> <[email protected]>:
>>>
>>>>
>>>> On Oct 3, 2013, at 3:24 PM, hans kaper wrote:
>>>>
>>>
>>>> Also, install strace and run login and see what happens.
>>>
>>>
>> Use the patch:
>>
>> http://www.linuxfromscratch.org/patches/downloads/strace/strace-4.8-glibc_2.18_build_fix-1.patch
>>
>>
> That worked!
>
> First line in Password is now:
> root::0:0:root:/root:/bin/bash
> I omitted the x after the first :, as Bruce advised.
> I assume that then no password is necessary.
That's right.
> Next I chroot as in the begin of ch.6, so that devices are loaded.
>
> Then: strace -olog.txt login
>
> The log-file gives a lot of data, but I think the most important are:
> .........
> read(0, "root\n", 1024) (reading from the kbd)
> .........
> open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
> ..........
> read(3, "root::0:0:root:/root:/bin/bash\nb"..., 4096) = 159
> ...........
> write(4, "Wachtwoord: ", 12) = 12 (=Password: )
This shouldn't happen. The sequence is:
root:~$ login
blfs login: root
No mail.
-bash-4.2#
If there is no pw, then it shouldn't even ask for one.
> read(4, "\n", 4096) = 1 (just Enter, no password
> necessary)
> write(4, "\n", 1)
> ...........
> _llseek(4, 0, 0xbfeae3e0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
>
> I assume the last line is the error, but I don't know what it means.
> If I give the password, the result is the same.
I looked at a trace for my system. Do you have /etc/group? These are
my opens, disregarding library and files not found:
open("/etc/login.defs", O_RDONLY) = 3
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
open("/etc/login.access", O_RDONLY) = 3
open("/var/log/lastlog", O_RDWR) = 3
open("/etc/group", O_RDONLY|O_CLOEXEC) = 3
open("/var/log/wtmp", O_WRONLY) = 3
open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 3
open("/etc/group", O_RDONLY|O_CLOEXEC) = 3
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
open("/dev/tty", O_RDWR|O_NONBLOCK) = 3
open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 3
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
open("/lib/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
open("/etc/profile", O_RDONLY) = 3
open("/root/.bash_history", O_RDONLY) = 3
open("/root/.bash_history", O_RDONLY) = 3
open("/usr/share/terminfo/x/xterm", O_RDONLY) = 3
open("/etc/inputrc", O_RDONLY) = 3
open("/root/.bash_history", O_WRONLY|O_APPEND) = 3
open("/root/.bash_history", O_RDONLY) = 3
Check that login.defs, nsswitch.conf, passwd, login.access, and group
all exist. Note that shadow is not opened.
-- Bruce
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page