You are not logged in.
Pages: 1
I saw the archlinux livecd can login as root automatedly, so I wonder how to make it happen.
Offline
root has no password assigned.
Edit: oh yeah and it has that autologin@.service on /etc/systemd/system
Last edited by chris_l (2012-11-17 02:49:21)
"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.
Offline
Learn to use the wiki!
Offline
Learn to use the wiki!
I tired it once and it didn't really work for me. I was being logged in automatically, but 'Login' and 'Password' kept respawning and destroyed tty1.
Is it working for you?
I'll try again (some edits were made yesterday) and open a separate thread if the wiki missed something.
Last edited by karol (2012-11-17 11:23:04)
Offline
Yep, works fine here...
Offline
I'll try again (some edits were made yesterday) and open a separate thread if the wiki missed something.
The wiki hasn't missed anything. This is my /etc/systemd/system/autologin\@.service:
[Unit]
Description=Getty on %I
Documentation=man:agetty(8)
After=systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes
# On systems without virtual consoles, don't start any getty. (Note
# that serial gettys are covered by serial-getty@.service, not this
# unit
ConditionPathExists=/dev/tty0
StopWhenUnneeded=true
[Service]
Environment=TERM=linux
# the VT is cleared by TTYVTDisallocate
ExecStart=-/sbin/agetty -8 -a antoine --noclear %I 38400
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
# Some login implementations ignore SIGTERM, so we send SIGHUP
# instead, to ensure that login terminates cleanly.
KillSignal=SIGHUP
[Install]
# Edit
WantedBy=getty.target
#Alias=getty.target.wants/getty@tty1.service
# this changed since I first set it up -- it still worked though ...
And it does a bang-up job! Did you do this:
# systemctl daemon-reload
# systemctl disable getty@tty1
# systemctl enable autologin@tty1
# systemctl start autologin@tty1
The one about disabling getty@tty1 is probalby reasonably important.
Last edited by Antoine (2012-11-17 23:55:31)
Offline
Antoine, please fix the quote, it should say 'karol wrote' :-)
Offline
Antonie,
Please update your code to reflect the changes to getty.target as outlined in the Automatic Login to Virtual Console wiki article, thanks
Offline
Antoine, please fix the quote, it should say 'karol wrote' :-)
Done. Sorry.
Offline
Antoine, please fix the quote, it should say 'karol wrote' :-)
Done. It's hard to keep up ...
Dunno how this one happened. How do we delete a post?
Last edited by Antoine (2012-11-17 23:57:10)
Offline
Antonie,
Please update your code to reflect the changes to getty.target as outlined in the Automatic Login to Virtual Console wiki article, thanks
Done. It's hard to keep up.
Offline
Just to note; you don't need to escape '@' on the command line like you have above. Someone added that to the wiki for awhile before it was corrected.
Upstream changes to the getty.target mean you can properly use the template that '@' represents. Essentially you achieve the same goal but getty.target provides more flexibility as you can now enable autologin@ on any tty instead of just tty1 without manually editing the service. E.g.
systemctl enable autologin@tty5
Would create an appropriate autologin@tty5.service symlink under /etc/systemd/system/getty.target.wants
PS: I wish we could use rst for forum posts instead of bbcode
Last edited by Earnestly (2012-11-18 12:45:11)
Offline
Is there a way to make agetty only ask for a password, and not for a username?
Offline
Pages: 1