unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: BJH2017 <brentonhorne77@gmail.com>
Cc: 29706@debbugs.gnu.org
Subject: bug#29706: GuixSD: Please add the ability to change shells for root
Date: Mon, 18 Dec 2017 23:18:47 +0100	[thread overview]
Message-ID: <87o9mv7k8o.fsf@gnu.org> (raw)
In-Reply-To: <CANb+58+BMeVR0Vw5GenuejY5GTcovFsbn-hkw5+LZ5yQ6MpQaQ@mail.gmail.com> (BJH's message of "Thu, 14 Dec 2017 18:38:26 +1000")

Hi,

BJH2017 <brentonhorne77@gmail.com> skribis:

> Using the configuration file /etc/config.scm it is fairly straight forward
> to change shells for a given user account on GuixSD 0.14.0, such as using:
>
> (operating system
>    (users (cons (user-account
>                          (name "user")
>                          ....
>                          (shell "/run/current-system/profile/bin/zsh")))))
>
> , but for root this is impossible. Is it possible this feature could be
> added?

I just realized it’s actually possible: if you add an account with
UID 0, then that account is the root account.

So you can write:

  (operating-system
    ;; …
    (users (cons (user-account
                   (name "this-can-be-root-or-something-else")
                   (uid 0)
                   ;; …
                   (shell (file-append zsh "/bin/zsh")))
                 …)))

… and you get a root account with the chosen name and shell.

Does it work for you?

I’ve clarified the situation:

  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=45f6211730157c50ade4dbf770e60871f1067ad6

Thanks,
Ludo’.

  reply	other threads:[~2017-12-18 22:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14  8:38 bug#29706: GuixSD: Please add the ability to change shells for root BJH2017
2017-12-18 22:18 ` Ludovic Courtès [this message]
     [not found]   ` <CANb+58KywakA5fYBQPV6sPrdm5EFAFd3dPKRiDeK-rncTYvrPg@mail.gmail.com>
2017-12-19 14:53     ` Ludovic Courtès
2017-12-19 15:02       ` BJH2017
2017-12-19 15:26         ` Ricardo Wurmus
2017-12-19 15:34         ` Alex Sassmannshausen
2017-12-19 15:39         ` Leo Famulari
2017-12-19 17:16         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9mv7k8o.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=29706@debbugs.gnu.org \
    --cc=brentonhorne77@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).