firstboot: reading firstboot-wizard-secret file

Explain how to read the firstboot-wizard-secret file using shell
commands. Remove output of the cat command.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati authored and James Valleroy committed 2019-11-18 18:10:24 -05:00
1 parent 00725b3526
commit 815d3ec0e8
2 files changed
+10 -7

No files matched your search

+6 -3
View File
@@ -18,6 +18,7 @@
from django import forms
from django.utils.translation import ugettext_lazy as _
from plinth import cfg
from plinth.modules import first_boot
@@ -26,9 +27,11 @@ class FirstbootWizardSecretForm(forms.Form):
secret = forms.CharField(
label='', help_text=_(
'Enter the secret generated during FreedomBox installation. '
'This secret can also be obtained from the file '
'/var/lib/plinth/firstboot-wizard-secret'), required=False,
widget=forms.PasswordInput(attrs={'placeholder': _('Secret')}))
'This secret can also be obtained by running the command "sudo '
'cat /var/lib/plinth/firstboot-wizard-secret" on your {box_name}'.
format(box_name=_(cfg.box_name))), required=False,
widget=forms.PasswordInput(
attrs={'placeholder': _('Firstboot Wizard Secret')}))
def validate_secret(self, secret):
"""Match the secret provided by the user with the one