TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: PETER PERCIVAL
from: LEW PITCHER
date: 2018-07-05 12:42:00
subject: Re: Login in problem

Peter Percival wrote:

> login pi
>
> gets the response
>
> login: Cannot possibly work without effective root
>
> I have created an account Peter according to the instructions in Upton &
> Halfacree's /Raspberry Pi User Guide/, page 54
>
> login Peter
>
> gets the same response as above.

Because it needs root privileges to set up a specific user's execution
environment, the login(1) binary must run with the "effective" userid of
root. That means that either root runs login, or something that becomes root
(like sudo) runs login.

The message you get ("Cannot possibly work without effective root") tells
you that the login process that /you/ launched does not have root
privileges.

login(1) is normally run automatically by getty(1), which (in turn) is
launched by your init service (init or systemd or whatever) in a root
context.

As to what to do here, I guess it depends somewhat on what Upton & Halfacree
told you to do.

Assuming nothing special, start your Pi, go to the terminal session, and
type your username and password in response to the normal prompts.

If you already have a command line, then you can use sudo to execute
login(1) as root. If you do this at a bare terminal (rather than at a
terminal emulation in the GUI environment) be prepared to be logged off as
the user you currently are. OTOH, if you do this in a GUI terminal
emulation, you /should/ get prompt for the new user's password (after the
prompt, if any, for the password for sudo), followed by (on success) the new
user's commandline.

HTH
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.