Bug 5366 - Login doesn't work with util-linux versions of login/agetty
Summary: Login doesn't work with util-linux versions of login/agetty
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2017.11
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: Gustavo Zacarias
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-19 07:50 UTC by Shokurov Anton V.
Modified: 2018-05-02 01:12 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:


Attachments
config file for the buildroot (25.26 KB, application/octet-stream)
2012-07-19 07:50 UTC, Shokurov Anton V.
Details
config file that has the AGETTY turned off (25.27 KB, application/octet-stream)
2012-07-20 11:25 UTC, Shokurov Anton V.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shokurov Anton V. 2012-07-19 07:50:12 UTC
Created attachment 4424 [details]
config file for the buildroot

After building the rootfs it seems that i can't login.
For instance, after the login prompt i type 'root', then it asks for the password (from what i understand it should have skipped that and show the shell prompt).

"
Welcome to Buildroot
buildroot login: root
Password: 
Login incorrect

buildroot login: default
Password: 
Login incorrect

buildroot login: 
"

The corresponding config file is included in the attachment.
Comment 1 Thomas Petazzoni 2012-07-19 07:57:07 UTC
Can you try disabling BR2_PACKAGE_UTIL_LINUX_AGETTY=y and doing a full rebuild (make clean; make) ?

We generally only use the getty program from Busybox, so if you use the getty program from util-linux, there may be a need to adapt certain configuration files.
Comment 2 Shokurov Anton V. 2012-07-19 13:53:15 UTC
(In reply to comment #1)
> Can you try disabling BR2_PACKAGE_UTIL_LINUX_AGETTY=y and doing a full rebuild
> (make clean; make) ?

Yup,...
It did not help.
I have a feeling it has to do with the WCHAR (the last time i had such a problem disabling it and everything that depended on it solved the problem).



> 
> We generally only use the getty program from Busybox, so if you use the getty
> program from util-linux, there may be a need to adapt certain configuration
> files.
Comment 3 Thomas Petazzoni 2012-07-20 08:20:59 UTC
Can you repost your new .config and confirm that you did a complete "make clean;  make" ?
Comment 4 Shokurov Anton V. 2012-07-20 11:25:54 UTC
Created attachment 4436 [details]
config file that has the AGETTY turned off
Comment 5 Shokurov Anton V. 2012-07-20 11:26:59 UTC
(In reply to comment #3)
> Can you repost your new .config and confirm that you did a complete "make
> clean;  make" ?

sure can.
It's more like:
make clean
make uclibc-menuconfig (to switch on the c99 floating-point support)
make
Comment 6 Thomas Petazzoni 2012-07-20 12:26:50 UTC
Can you ask Buildroot to generate a tarball from your root filesystem, and put it online somewhere (if it doesn't contain anything confidential or proprietary)?
Comment 7 Shokurov Anton V. 2012-07-20 12:50:08 UTC
(In reply to comment #6)
> Can you ask Buildroot to generate a tarball from your root filesystem, and put
> it online somewhere (if it doesn't contain anything confidential or
> proprietary)?

Ye, i can:
http://narod.ru/disk/57181292001.18e379e53510d51e84a28efe2e5ef7bc/rootfs.tar.gz.html
Comment 8 Shokurov Anton V. 2012-07-26 04:55:42 UTC
(In reply to comment #6)
> Can you ask Buildroot to generate a tarball from your root filesystem, and put
> it online somewhere (if it doesn't contain anything confidential or
> proprietary)?

I think i figures out the cause of the problem.
What should the '/bin/login' be? In the versions that work it points to 'busybox'. In the version that does not work (this version) it's a standard executable.

Could this be the reason that i can't login?
Comment 9 Thomas Petazzoni 2012-07-26 06:50:42 UTC
(In reply to comment #8)

> I think i figures out the cause of the problem.
> What should the '/bin/login' be? In the versions that work it points to
> 'busybox'. In the version that does not work (this version) it's a standard
> executable.
> 
> Could this be the reason that i can't login?

Ah, yes, good point! /bin/login can be provided by util-linux. I thought about getty (which I told you already), but I forgot about /bin/login. Can you try disabling BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS to see if it works better?

It would be nice to figure out why the /bin/login from util-linux doesn't work. My initial suspicion would be that it lacks the SUID-root bit set, but on my system /bin/login doesn't have this bit set. Or maybe the util-linux /bin/login requires some configuration file that we don't have or something.
Comment 10 Jonathan Liu 2012-07-26 07:41:23 UTC
Have you tried changing root:x: to root:: in /etc/passwd?
Comment 11 Shokurov Anton V. 2012-07-26 19:06:59 UTC
(In reply to comment #9)
> (In reply to comment #8)
> 
> > I think i figures out the cause of the problem.
> > What should the '/bin/login' be? In the versions that work it points to
> > 'busybox'. In the version that does not work (this version) it's a standard
> > executable.
> > 
> > Could this be the reason that i can't login?
> 
> Ah, yes, good point! /bin/login can be provided by util-linux. I thought about
> getty (which I told you already), but I forgot about /bin/login. Can you try
> disabling BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS to see if it works better?
> 

Yup, if i disable BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS it works (i can login).
Comment 12 Shokurov Anton V. 2012-07-26 19:09:16 UTC
(In reply to comment #10)
> It would be nice to figure out why the /bin/login from util-linux doesn't work.
> My initial suspicion would be that it lacks the SUID-root bit set, but on my
> system /bin/login doesn't have this bit set. Or maybe the util-linux /bin/login
> requires some configuration file that we don't have or something.

> Have you tried changing root:x: to root:: in /etc/passwd?

Yes, i have. This does make it work (i can login), but since this is a 'hack' (i don't know why this makes it work) i refrained from using this in our system.
Comment 13 Gustavo Zacarias 2013-12-11 17:15:55 UTC
This should be fixed by commits 72b3c1db513a6235fd5e5f00fb6c15071ffc6015, 33e3245e047858cd89223cf5b4afbf4cb32318b0 and 1a0b170a55126115d883f6cde9871e06a80f9cc2 (maybe i'm missing some other) for the 2014.02 release.
If you're still seeing issues with this feel free to reopen this bug with the details (and using a latest git version). Thanks.
Comment 14 Dhananjay Patil 2018-05-01 13:17:29 UTC
I am facing same problem for buildroot 2017.11 
Both options BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS and BR2_PACKAGE_UTIL_LINUX_AGETTY are disabled.
Comment 15 Carlos Santos 2018-05-02 01:12:14 UTC
(In reply to Dhananjay Patil from comment #14)

Please do not reopen an old case just because you see a similar problem six years later. Both Buildroot and util-linux changed a lot since 2012. Open a new bug and attach your defconfig, as well as other information that can be useful to reproduce your problem, instead.