You are not logged in.
I found this in an already closed thread, but I didn't understand how to achieve turning off the warning.
https://bbs.archlinux.org/viewtopic.php?id=294465
seth wrote: Unsetting CREDENTIALS_DIRECTORY in the service environment should silence that but not change anything about the behavior, so not much to worry here.
My getty@tty1.service unit is here: https://0x0.st/s/EOlyKCipZcbbQ3WAwyh1Tg/X8io.service but I can't find CREDENTIALS_DIRECTORY there.
❯ systemctl status getty@tty1.service
● getty@tty1.service - Getty on tty1
Loaded: loaded (/usr/lib/systemd/system/getty@.service; enabled; preset: enabled)
Active: active (running) since Sun 2024-05-05 18:21:01 CEST; 1 day 1h ago
Docs: man:agetty(8)
man:systemd-getty-generator(8)
https://0pointer.de/blog/projects/serial-console.html
Main PID: 478 (agetty)
Tasks: 1 (limit: 9458)
Memory: 996.0K (peak: 1.9M)
CPU: 16ms
CGroup: /system.slice/system-getty.slice/getty@tty1.service
└─478 /sbin/agetty -o "-p -- \\u" --noclear - linux
May 05 18:21:01 router systemd[1]: Started Getty on tty1.
May 05 18:21:01 router agetty[478]: failed to open credentials directory
Thanks
Last edited by vecino (2024-05-07 17:43:31)
Offline
See the linked https://wiki.archlinux.org/title/Getty#Virtual_console - you'll have to augment the service (there's a sublink) and add "Environment=CREDENTIALS_DIRECTORY="
I guess the variable ise set by systemd at some point but this will (hopefully) override that.
Oetherwise you could wrap the actual Exec w/ env (I'll explain the details of that iff that becomes a necessity)
Online
I'm not sure if I got it right, but I tried two ways.
1) I created a file /etc/systemd/system/getty@tty1.service.d/autologin.conf and put into it:
[Service]
Environment=CREDENTIALS_DIRECTORY=
2) systemctl edit --full getty@tty1.service and there I also added Environment=CREDENTIALS_DIRECTORY= .
systemctl daemon-reload + systemctl restart getty@tty1.service
But the result is still the same:
May 07 18:12:43 router agetty[14965]: failed to open credentials directory
Offline
https://man.archlinux.org/man/core/syst … NVIRONMENT
UnsetEnvironment=CREDENTIALS_DIRECTORY
Edit: "autologin.conf" isn't maybe the greatest name for this drop-in
Last edited by seth (2024-05-07 16:31:44)
Online
I have to learn, I have to learn, I have to learn...
@seth - you're the best - once again you've given me excellent advice for the umpteenth time... the annoying catchphrase is gone. Thak you!
autologin.conf -> spam.conf
Offline
We all learn as we go - I had no idea how to unset environment variables in systemd services until now, thanks to you, I do
Online
If anyone was looking for a final solution:
Just create a directory /etc/systemd/system/getty@tty1.service.d and place any .conf name in it and paste it in:
[Service]
UnsetEnvironment=CREDENTIALS_DIRECTORY
after that run: systemctl daemon-reload + systemctl restart getty@tty1.service
done - failed to open credentials directory message is gone
Offline
You might want to
sudo systemctl edit getty@.service
to override all getty's this way.
Online
Yes, that's how it works too. I would just add --full.
systemctl edit --full getty@tty1.service
I'm just not sure it'll survive the update util-linux package.
Offline
I would just add --full
Why? Using a drop-in would survive any update for sure.
Online
Ok - my ignorance again. Then it's the perfect solution. Thanks again.
Offline
Ah, I only just understood your post seth. Until now I thought I always had to edit the unit with --full, otherwise it wouldn't save.
❯ systemctl edit getty@.service
Successfully installed edited file '/etc/systemd/system/getty@.service.d/override.conf'.
But it doesn't apply to the drop-in.
### Editing /etc/systemd/system/getty@.service.d/override.conf
### Anything between here and the comment below will become the contents of the drop-in file
Offline