Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add crypttab option silent #19619

Merged
merged 1 commit into from
May 15, 2021
Merged

Add crypttab option silent #19619

merged 1 commit into from
May 15, 2021

Conversation

C4K3
Copy link
Contributor

@C4K3 C4K3 commented May 15, 2021

Adds a crypttab option 'silent' that enables the AskPasswordFlag
ASK_PASSWORD_SILENT. This allows usage of systemd-cryptsetup to default
to silent mode, rather than requiring the user to press tab every time.

Adds a crypttab option 'silent' that enables the AskPasswordFlag
ASK_PASSWORD_SILENT. This allows usage of systemd-cryptsetup to default
to silent mode, rather than requiring the user to press tab every time.
@keszybz
Copy link
Member

keszybz commented May 15, 2021

LGTM.

@keszybz keszybz merged commit 1fa94a3 into systemd:main May 15, 2021
@poettering
Copy link
Member

Hmm, I don't like the name of this, it's too generic. i.e. reading a crypttab option with this flag set would make me think that it would suppress interactivity and error reporting or so. But this is not what it does.

Hence, I think the crypttab option should get a more, precise accurate name. maybe "hide-password-asterisks" or "silent-password-query" or so.

It's fine if that#s a bit longer a string, given that I doubt this will be used in the majority of cases.

Any chance you can prep a follow-up patch renaming the crypttab option?

(the setting internally is fine if called "silent", i am really just not happy with the name as exposed in crypttab)

@keszybz
Copy link
Member

keszybz commented May 18, 2021

"asterisks" is pretty hard to type from memor for non-native speakers and people with dyslexia. "hide-password-asterisks" even more so... I'm not against changing the name, but let's keep it succinct. "quiet" or "noecho" mabe?

@poettering
Copy link
Member

"quiet" isn't much better than "silent", since it still suggests we'd hide error messages or so tht way.

internally, we have three levels: "echo", regular operation, and "silent". The former means we'll echo the pw literally as it is typed in, the regular operation is to show the asterisks, and the "silent" operation is to hide everything. Maybe we should hence expose this as a setting taking a value: password-prompt=echo|no-echo|silent?

what i also don't like about this patch is that it only applies to auth-via-password right now. auth via security token (where we ask for a PIN typically, using the very same mechanisms) is excluded from this, but it should apply there too.

Also, I think the "systemd-ask-password" tool should really get a cmdline switch exposing similar behaviour. It currently does not.

@C4K3 C4K3 deleted the cryptsetup-silent branch May 30, 2021 20:31
@C4K3
Copy link
Contributor Author

C4K3 commented May 30, 2021

I opened #19763

I don't have an opinion on the config option, but I can rename it to whatever you'd like. For another suggestion, silent-input?

i can add equivalent flags to the systemd-ask-password and systemd-cryptenroll binaries if we decide on an argument name.

C4K3 added a commit to C4K3/systemd that referenced this pull request Jun 3, 2021
Use the option name 'password-echo' instead of the generic term
'silent'.

Make the option take an argument for better control over echoing
behavior.

Related discussion in systemd#19619
C4K3 added a commit to C4K3/systemd that referenced this pull request Jun 3, 2021
Use the option name 'password-echo' instead of the generic term
'silent'.

Make the option take an argument for better control over echoing
behavior.

Related discussion in systemd#19619
C4K3 added a commit to C4K3/systemd that referenced this pull request Jun 3, 2021
Use the option name 'password-echo' instead of the generic term
'silent'.

Make the option take an argument for better control over echoing
behavior.

Related discussion in systemd#19619
C4K3 added a commit to C4K3/systemd that referenced this pull request Jun 4, 2021
Use the option name 'password-echo' instead of the generic term
'silent'.

Make the option take an argument for better control over echoing
behavior.

Related discussion in systemd#19619
C4K3 added a commit to C4K3/systemd that referenced this pull request Jun 5, 2021
Use the option name 'password-echo' instead of the generic term
'silent'.

Make the option take an argument for better control over echoing
behavior.

Related discussion in systemd#19619
poettering pushed a commit that referenced this pull request Jun 7, 2021
Use the option name 'password-echo' instead of the generic term
'silent'.

Make the option take an argument for better control over echoing
behavior.

Related discussion in #19619
dakr pushed a commit to dakr/systemd that referenced this pull request Jun 14, 2021
Use the option name 'password-echo' instead of the generic term
'silent'.

Make the option take an argument for better control over echoing
behavior.

Related discussion in systemd#19619
mrc0mmand pushed a commit to mrc0mmand/rhel-9 that referenced this pull request Jul 2, 2021
Use the option name 'password-echo' instead of the generic term
'silent'.

Make the option take an argument for better control over echoing
behavior.

Related discussion in systemd/systemd#19619
mrc0mmand pushed a commit to mrc0mmand/rhel-9 that referenced this pull request Jul 2, 2021
Use the option name 'password-echo' instead of the generic term
'silent'.

Make the option take an argument for better control over echoing
behavior.

Related discussion in systemd/systemd#19619
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants