You are not logged in.

#1 2025-02-26 14:01:13

FrancisArcher_60
Member
Registered: 2024-09-05
Posts: 58

[SOLVED]I can't to autologin from tty

I'm trying to autologin my user from tty1, but when reboot, tty1 asks me for user and password as normal.

Firstly I copied the getty service to create other:

sudo cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/autologin@.service

I linked it

sudo ln -sf /etc/systemd/system/autologin\@.service /etc/systemd/system/getty.target.wants/getty\@tty1.service

I edited it with systemctl and added this:

[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin franco --noclear %I $TERM

I reload the daemons and restart the service.

Also I tried editing directly the service without creating other and simlink to it, but neither I get autologin.

Last edited by FrancisArcher_60 (2025-02-27 21:55:37)

Offline

#2 2025-02-26 15:13:41

mackin_cheese
Member
Registered: 2025-01-07
Posts: 477

Re: [SOLVED]I can't to autologin from tty

have you tried following the wiki? cause what you did and what the wiki states are different.

Offline

#3 2025-02-26 15:21:43

FrancisArcher_60
Member
Registered: 2024-09-05
Posts: 58

Re: [SOLVED]I can't to autologin from tty

mackin_cheese wrote:

have you tried following the wiki? cause what you did and what the wiki states are different.

I tried as says the wiki and this last way

Offline

#4 2025-02-26 15:24:19

mackin_cheese
Member
Registered: 2025-01-07
Posts: 477

Re: [SOLVED]I can't to autologin from tty

ah you didn't say that the in the op, so to confirm you did the following?

 

/etc/systemd/system/getty@tty1.service.d/autologin.conf

[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin username %I $TERM

Offline

#5 2025-02-26 15:26:46

FrancisArcher_60
Member
Registered: 2024-09-05
Posts: 58

Re: [SOLVED]I can't to autologin from tty

mackin_cheese wrote:

ah you didn't say that the in the op, so to confirm you did the following?

 

/etc/systemd/system/getty@tty1.service.d/autologin.conf

[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin username %I $TERM

I was tried with these modifiers, doesn't work, but I will try again with them.

Offline

#6 2025-02-26 16:32:25

FrancisArcher_60
Member
Registered: 2024-09-05
Posts: 58

Re: [SOLVED]I can't to autologin from tty

FrancisArcher_60 wrote:

I was tried with these modifiers, doesn't work, but I will try again with them.

No, doesn't works.

Offline

#7 2025-02-26 16:44:09

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED]I can't to autologin from tty

FrancisArcher_60 wrote:

Firstly I copied the getty service to create other:

sudo cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/autologin@.service

I linked it

sudo ln -sf /etc/systemd/system/autologin\@.service /etc/systemd/system/getty.target.wants/getty\@tty1.service

That's not right — there shouldn't be a "autologin@.service" with the same content as getty@.service, that's nonsense. You should have an autologin.conf with just 3 lines.

FrancisArcher_60 wrote:

I was tried with these modifiers, doesn't work

The important error is not the modifiers in the ExecStart line but the name and location of the file. Read mackin_cheese's post again. And be sure to replace username with the actual username.


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB