util-linux / util-linux

http://en.wikipedia.org/wiki/Util-linux
GNU General Public License v2.0
2.59k stars 1.18k forks source link

agetty: failed to open credentials directory #2896

Closed virgilhem closed 3 months ago

virgilhem commented 4 months ago

During Linux system login, an error message "failed to open credentials directory" from agetty is recorded in the logs. This does not disrupt the login process. The CREDENTIALS_DIRECTORY environment variable is set to "/run/credentials/getty@tty1.service", which does not exist.

Version of util-linux: 2.40

karelzak commented 4 months ago

We can remove the warning, but the question is whether this is right, as it hides possible problems for users who want to use credentials. So, why is $CREDENTIALS_DIRECTORY defined in your case?

virgilhem commented 4 months ago

Thank you for your response. I don't currently use any credentials. However, based on the information provided in https://github.com/systemd/systemd/issues/31337, it appears that the bug might be associated with a race condition occurring with the ImportCredential directive, as used in the getty@ service file provided in the last release of systemd. I'll wait for the next release to see if it's resolved.

YHNdnzj commented 4 months ago

This should be fixed by https://github.com/systemd/systemd/pull/31202. Previously, if no creds matching ImportCredential= are found, the dir is not created at all, but the envvar is set, which is pretty confusing.