aboutsummaryrefslogtreecommitdiff
path: root/gnu/installer/newt
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-24 21:54:28 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-25 00:45:35 +0200
commit91a7c4998fe4f5a2a63f2ddb4bfeeef81c68b6d7 (patch)
treeb74d2da50fa8cf33a87f9db9be645f593a7e57ec /gnu/installer/newt
parent399c31d40a918343c5513c3c4a0351f60ec5797b (diff)
downloadguix-91a7c4998fe4f5a2a63f2ddb4bfeeef81c68b6d7.tar
guix-91a7c4998fe4f5a2a63f2ddb4bfeeef81c68b6d7.tar.gz
installer: Ask for the root account password.
Fixes <https://bugs.gnu.org/35399>. * gnu/installer/newt/user.scm (run-root-password-page): New procedure. * gnu/installer/user.scm (users->configuration): Filter out the "root" account. * gnu/installer/final.scm (create-user-database): Set 'uid' field in 'user-account' form.
Diffstat (limited to 'gnu/installer/newt')
-rw-r--r--gnu/installer/newt/user.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/installer/newt/user.scm b/gnu/installer/newt/user.scm
index 032f9b9276..327e294362 100644
--- a/gnu/installer/newt/user.scm
+++ b/gnu/installer/newt/user.scm
@@ -104,6 +104,14 @@
(lambda ()
(destroy-form-and-pop form)))))))
+(define (run-root-password-page)
+ ;; TRANSLATORS: Leave "root" untranslated: it refers to the name of the
+ ;; system administrator account.
+ (run-input-page (G_ "Please choose a password for the system \
+administrator (\"root\").")
+ (G_ "System administrator password")
+ #:input-flags FLAG-PASSWORD))
+
(define (run-user-page)
(define (run users)
(let* ((listbox (make-listbox
@@ -181,4 +189,9 @@
users))))
(lambda ()
(destroy-form-and-pop form))))))
- (run '()))
+
+ ;; Add a "root" user simply to convey the root password.
+ (cons (user (name "root")
+ (home-directory "/root")
+ (password (run-root-password-page)))
+ (run '())))