[lfs-support] Unable to login SOLVED

Bruce Dubbs bruce.dubbs at gmail.com
Sat Oct 5 08:40:45 PDT 2013


hans kaper wrote:
> Op Fri, 04 Oct 2013 23:13:20 +0200 schreef Bruce Dubbs <bruce.dubbs at gmail.com>:
>
>
>>>
>>> Then: strace -olog.txt login
>>>
>>
>>
>> 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("/root/.bash_history", O_RDONLY)   = 3
>>
> The last part of the list of files were not opened because login did not come that far.
>
>> Check that login.defs, nsswitch.conf, passwd, login.access, and group
>> all exist.  Note that shadow is not opened.
>
> Because you use no password?

Not normally.  I just did it to check things for you.

> All the files are there.
>
> I copied passwd, groups and shadow from my succesful build of
> LFS7_3 to LFS7_4,

Yes, I do that all the time. Also gshadow, bashrc, profile{,.d}, vimrc, 
dircolors, inputrc, and a few others.  But that's off topic.

but no log-in, although a different error-message.
>
> Then, in the end, I re-installed Shadow et voila: a successful login!

There you go.

> Analysing the logs, I saw no differences with the first install,
apart from installs by libtool from /usr/bin/install
instead of /tools/bin/install, but that shall originate
from the fact that in the first build  libtool was build after Shadow.

Yes, that's reasonable.

>
> That leaves the question why the failures occurred in the first place?
Any suggestion were I should look in the strace-logfiles to get a clue?
LFS is for learning, he?

Yes.

> The login-failure occurred after the password was given.
In the successful login login.access was opened, but that was
not the case in the failed login, although /etc/login.access existed.
There was also no failure of opening that file.

My only guess would be that something was either not installed or 
installed in the wrong place the first time around.

In the end, the only way to really analyze what was going on is to look 
at the source code.  Obviously the login program was executing.  Follow 
the source after you typed the username and see if you can correlate 
that to the strace logs.  That's about the only suggestion I can offer 
at this point.  Look at src/login_nopam.c and src/login.c

> But again, Bruce, I am, very grateful for your extensive help!!

No problem.

   -- Bruce





More information about the lfs-support mailing list