[Pkg-shadow-devel] Bug#421652: /bin/login: can call from the command line anymore

Nicolas François nicolas.francois at centraliens.net
Mon Apr 30 21:35:37 UTC 2007


On Tue, May 01, 2007 at 04:06:33AM +0800, jidanni at jidanni.org wrote:
> Nowadays
> $ /bin/login
> says
> No utmp entry.  You must exec "login" from the lowest level "sh"
> even though
> $ cat /proc/$PPID/cmdline
> says
> /bin/login
> I.e., I am certainly at the lowest shell. pstree says
> init--login--bash.

Why do you want to run login?

login is usually run from init--getty, by root.
getty ensures that there is a utmp entry.

> So you might change
> No utmp entry.  You must exec "login" from the lowest level "sh"
> to
> Try instead "exec login" from the lowest level "sh".

"No utmp entry." is the reason of the failure, I do not want to remove it.

> or something.

That would be better. Maybe the message should give a tip about running
login as root. I propose:
    No utmp entry.  You may want to run, as root, "exec login".

It used to be possible to "exec login", but this is no more the case since
login is no more suid.

Kind Regards,

More information about the Pkg-shadow-devel mailing list