gnu: vm: Add a 'guest' account.

* gnu/system/vm.scm (system-qemu-image): Add a "guest" user and a
  "users" user group.  Make /home/guest.  Add /etc/group.  Update
  /etc/issue to mention it.
This commit is contained in:
Ludovic Courtès 2013-09-26 22:06:00 +02:00
parent 16a0e9dc34
commit 8bc755c08c

View file

@ -481,13 +481,24 @@ (define resolv.conf
(uid 0) (gid 0)
(comment "System administrator")
(home-directory "/")
(shell bash-file))
(user-account
(name "guest")
(password "")
(uid 1000) (gid 100)
(comment "Guest of GNU")
(home-directory "/home/guest")
(shell bash-file))))
(passwd (passwd-file store accounts))
(shadow (passwd-file store accounts #:shadow? #t))
(group (group-file store
(list (user-group
(name "root")
(id 0)))))
(id 0))
(user-group
(name "users")
(id 100)
(members '("guest"))))))
(pam.d-drv (pam-services->directory store %pam-services))
(pam.d (derivation->output-path pam.d-drv))
@ -522,7 +533,7 @@ (define resolv.conf
build it (http://www.gnu.org/software/guix/). The init system is
GNU dmd (http://www.gnu.org/software/dmd/).
You can log in as 'root' with no password.
You can log in as 'guest' or 'root' with no password.
"))
(populate `((directory "/etc")
@ -530,13 +541,15 @@ (define resolv.conf
(directory "/var/run/nscd")
("/etc/shadow" -> ,shadow)
("/etc/passwd" -> ,passwd)
("/etc/group" -> ,group)
("/etc/login.defs" -> "/dev/null")
("/etc/pam.d" -> ,pam.d)
("/etc/resolv.conf" -> ,resolv.conf)
("/etc/profile" -> ,bashrc)
("/etc/issue" -> ,issue)
(directory "/var/nix/gcroots")
("/var/nix/gcroots/default-profile" -> ,profile)))
("/var/nix/gcroots/default-profile" -> ,profile)
(directory "/home/guest")))
(out (derivation->output-path
(package-derivation store mingetty)))
(boot (add-text-to-store store "boot"