aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-26 22:06:00 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-27 00:46:17 +0200
commit8bc755c08c08577193291dc07013d48e25522aae (patch)
tree470f0ade2b3abd0d96d2ad143e70744e236ad5d2 /gnu
parent16a0e9dc3449fb9de699486ad6db2c0bc62b616b (diff)
downloadpatches-8bc755c08c08577193291dc07013d48e25522aae.tar
patches-8bc755c08c08577193291dc07013d48e25522aae.tar.gz
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/system/vm.scm19
1 files changed, 16 insertions, 3 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 48f008cff0..c4ca2e3343 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -481,13 +481,24 @@ Happy birthday, GNU! http://www.gnu.org/gnu30
(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 @@ This image features the GNU Guix package manager, which was used to
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 @@ You can log in as 'root' with no password.
(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"