summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan (janneke) Nieuwenhuizen <janneke@gnu.org>2020-04-05 14:36:34 +0200
committerLudovic Courtès <ludo@gnu.org>2020-04-11 21:01:09 +0200
commit6598c6149b28ea7ba3450e0081a55e2baabf1371 (patch)
tree0269e9d9c9c52fc37816191d8fbaba53fea81d0c
parentcd4faab5636cfc30765f9642189787f49daba519 (diff)
system: hurd: Add /etc/{passwd,shadow}.
* gnu/system/hurd.scm: Generate hard-coded /etc/{passwd,shadow}, allows running chown in MAKEDEV and loggin in.
-rw-r--r--gnu/system/hurd.scm18
1 files changed, 17 insertions, 1 deletions
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 4830c91553..3926f11315 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -80,6 +80,18 @@ menuentry \"GNU\" {
/dev/hd0s1 / ext2 defaults
"))
+ (define passwd
+ (plain-file "passwd"
+"root:x:0:0:root:/root:/bin/sh
+"
+))
+
+ (define shadow
+ (plain-file "shadow"
+"root::0:0:0:0:::
+"
+))
+
(define hurd-directives
`((directory "/servers")
,@(map (lambda (server)
@@ -104,6 +116,8 @@ menuentry \"GNU\" {
hurd)
"/hurd"))
("/etc/fstab" -> ,fstab)
+ ("/etc/passwd" -> ,passwd)
+ ("/etc/shadow" -> ,shadow)
;; XXX can we instead, harmlessly set _PATH_TTYS (from glibc) in runttys.c?
("/etc/ttys" -> ,(file-append (with-parameters ((%current-target-system
"i586-pc-gnu"))
@@ -115,7 +129,9 @@ menuentry \"GNU\" {
#:device-nodes 'hurd
#:inputs `(("system" ,hurd-os)
("grub.cfg" ,grub.cfg)
- ("fstab" , fstab))
+ ("fstab" ,fstab)
+ ("passwd" ,passwd)
+ ("shadow" ,shadow))
#:copy-inputs? #t
#:os hurd-os
#:bootcfg-drv grub.cfg