4

CentOS 7

I am using systemd-ask-password as part of the script that starts my systemd service. The problem is that systemd-ask-password prompts for the input on EVERY open terminal. I need to prompt on ONLY the terminal for the user starting the service.

One thing that I tried was to stop systemd-ask-password-wall.service and start systemd-ask-password-console.service. This worked, but it seems to be the wrong thing to do based on the description of systemd-ask-password-console.service:

A boot-time password agent querying the user directly on the console

How can I make systemd-ask-password prompt only on the terminal of the user starting the service? Or do I need to do something else entirely? Is it appropriate to use systemd-ask-password-console.service in place of systemd-ask-password-wall.service?

0

To prevent wall messages from messing up all of your open terminals:

sudo systemctl stop systemd-ask-password-wall.service
sudo systemctl stop systemd-ask-password-wall.path

To make this change persistent over boot:

sudo systemctl mask systemd-ask-password-wall.service
sudo systemctl mask systemd-ask-password-wall.path

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.