Report forwarded
to bug-guix@gnu.org: bug#29706; Package guix.
(Thu, 14 Dec 2017 08:39:02 GMT) (full text, mbox, link).
Acknowledgement sent
to BJH2017 <brentonhorne77@gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix@gnu.org.
(Thu, 14 Dec 2017 08:39:03 GMT) (full text, mbox, link).
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?
Subject: Re: bug#29706: GuixSD: Please add the ability to change shells for
root
Date: Mon, 18 Dec 2017 23:18:47 +0100
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’.
Information forwarded
to bug-guix@gnu.org: bug#29706; Package guix.
(Tue, 19 Dec 2017 14:54:02 GMT) (full text, mbox, link).
Subject: Re: bug#29706: GuixSD: Please add the ability to change shells for
root
Date: Tue, 19 Dec 2017 15:53:32 +0100
Please always keep the list Cc’d.
BJH2017 <brentonhorne77@gmail.com> skribis:
> No it doesn't, I have this at the moment:
>
> (name "root")
> (uid 0)
> (group "root")
> (home-directory "/root")
> (shell (file-append zsh "/bin/zsh")))
>
> and I get the error:
>
> guix system: error: failed to load '/etc/config.scm':
> /etc/config.scm:35:9: /etc/config.scm:35:9: Wrong number of arguments to
> #<procedure cons (_ _)>
‘cons’ adds an element to a list, so it takes two arguments:
(cons account list)
as in:
(cons (user-account …) %base-user-accounts)
HTH!
Ludo’.
Information forwarded
to bug-guix@gnu.org: bug#29706; Package guix.
(Tue, 19 Dec 2017 15:03:01 GMT) (full text, mbox, link).
(thought I had CC'ed the group with my last comment but unfortunately gmail
doesn't do this by default, sorry)
Ya I do have %base-user-accounts in my config file here is what I had for
user accounts in full:
(users (cons
(user-account
(name "root")
(uid 0)
(group "root")
(supplementary-groups '("home-directory"))
(home-directory "/root")
(shell (file-append zsh "/bin/zsh")))
(user-account
(name "fusion809")
(comment "Brenton Horne")
(group "users")
(supplementary-groups '("wheel" "netdev"
"audio" "video"))
(home-directory "/home/fusion809")
(shell "/run/current-system/profile/bin/zsh"))
%base-user-accounts))
guessing the problem here is that I have two user-account fields?
On 20 December 2017 at 00:53, Ludovic Courtès <ludo@gnu.org> wrote:
> Please always keep the list Cc’d.
>
> BJH2017 <brentonhorne77@gmail.com> skribis:
>
> > No it doesn't, I have this at the moment:
> >
> > (name "root")
> > (uid 0)
> > (group "root")
> > (home-directory "/root")
> > (shell (file-append zsh "/bin/zsh")))
> >
> > and I get the error:
> >
> > guix system: error: failed to load '/etc/config.scm':
> > /etc/config.scm:35:9: /etc/config.scm:35:9: Wrong number of arguments to
> > #<procedure cons (_ _)>
>
> ‘cons’ adds an element to a list, so it takes two arguments:
>
> (cons account list)
>
> as in:
>
> (cons (user-account …) %base-user-accounts)
>
> HTH!
>
> Ludo’.
>
Subject: Re: bug#29706: GuixSD: Please add the ability to change shells for
root
Date: Tue, 19 Dec 2017 16:26:14 +0100
Hi,
> (users (cons
> (user-account
> (name "root")
> (uid 0)
> (group "root")
> (supplementary-groups '("home-directory"))
> (home-directory "/root")
> (shell (file-append zsh "/bin/zsh")))
> (user-account
> (name "fusion809")
> (comment "Brenton Horne")
> (group "users")
> (supplementary-groups '("wheel" "netdev"
> "audio" "video"))
> (home-directory "/home/fusion809")
> (shell "/run/current-system/profile/bin/zsh"))
> %base-user-accounts))
>
> guessing the problem here is that I have two user-account fields?
Yes, “cons” takes a single item (its first argument) and prepends it to a
list (its second argument). You can use “cons*” here, which prepends
more than one thing to a list.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
Information forwarded
to bug-guix@gnu.org: bug#29706; Package guix.
(Tue, 19 Dec 2017 15:35:01 GMT) (full text, mbox, link).
Subject: Re: bug#29706: GuixSD: Please add the ability to change shells for
root
Date: Tue, 19 Dec 2017 16:34:43 +0100
Hi,
BJH2017 writes:
> (thought I had CC'ed the group with my last comment but unfortunately gmail doesn't do this by default, sorry)
>
> Ya I do have %base-user-accounts in my config file here is what I had for user accounts in full:
>
> (users (cons
> (user-account
> (name "root")
> (uid 0)
> (group "root")
> (supplementary-groups '("home-directory"))
> (home-directory "/root")
> (shell (file-append zsh "/bin/zsh")))
> (user-account
> (name "fusion809")
> (comment "Brenton Horne")
> (group "users")
> (supplementary-groups '("wheel" "netdev"
> "audio" "video"))
> (home-directory "/home/fusion809")
> (shell "/run/current-system/profile/bin/zsh"))
> %base-user-accounts))
>
> guessing the problem here is that I have two user-account fields?
That's correct. Either use:
(cons (user-account ...)
(cons (user-account ...)
%base-user-accounts))
Or
(cons* (user-account ...) (user-account ...) %base-user-accounts)
HTH,
Alex
> On 20 December 2017 at 00:53, Ludovic Courtès <ludo@gnu.org> wrote:
>
> Please always keep the list Cc’d.
>
> BJH2017 <brentonhorne77@gmail.com> skribis:
>
> > No it doesn't, I have this at the moment:
> >
> > (name "root")
> > (uid 0)
> > (group "root")
> > (home-directory "/root")
> > (shell (file-append zsh "/bin/zsh")))
> >
> > and I get the error:
> >
> > guix system: error: failed to load '/etc/config.scm':
> > /etc/config.scm:35:9: /etc/config.scm:35:9: Wrong number of arguments to
> > #<procedure cons (_ _)>
>
> ‘cons’ adds an element to a list, so it takes two arguments:
>
> (cons account list)
>
> as in:
>
> (cons (user-account …) %base-user-accounts)
>
> HTH!
>
> Ludo’.
Information forwarded
to bug-guix@gnu.org: bug#29706; Package guix.
(Tue, 19 Dec 2017 15:40:01 GMT) (full text, mbox, link).
On Wed, Dec 20, 2017 at 01:02:02AM +1000, BJH2017 wrote:
> (thought I had CC'ed the group with my last comment but unfortunately gmail
> doesn't do this by default, sorry)
>
> Ya I do have %base-user-accounts in my config file here is what I had for
> user accounts in full:
>
> (users (cons
> (user-account
> (name "root")
> (uid 0)
> (group "root")
> (supplementary-groups '("home-directory"))
> (home-directory "/root")
> (shell (file-append zsh "/bin/zsh")))
> (user-account
> (name "fusion809")
> (comment "Brenton Horne")
> (group "users")
> (supplementary-groups '("wheel" "netdev"
> "audio" "video"))
> (home-directory "/home/fusion809")
> (shell "/run/current-system/profile/bin/zsh"))
> %base-user-accounts))
>
> guessing the problem here is that I have two user-account fields?
Right, if you are adding more than one element to %base-user-accounts,
you'll need to use cons* instead of cons.
(users (cons* (user-account
(name "root")
...)
(user-account
(name "fusion809")
...)
%base-user-accounts))
Subject: Re: bug#29706: GuixSD: Please add the ability to change shells for
root
Date: Tue, 19 Dec 2017 18:16:27 +0100
Hello,
BJH2017 <brentonhorne77@gmail.com> skribis:
> Ya I do have %base-user-accounts in my config file here is what I had for
> user accounts in full:
>
> (users (cons
> (user-account
> (name "root")
> (uid 0)
> (group "root")
> (supplementary-groups '("home-directory"))
> (home-directory "/root")
> (shell (file-append zsh "/bin/zsh")))
> (user-account
> (name "fusion809")
> (comment "Brenton Horne")
> (group "users")
> (supplementary-groups '("wheel" "netdev"
> "audio" "video"))
> (home-directory "/home/fusion809")
> (shell "/run/current-system/profile/bin/zsh"))
> %base-user-accounts))
Here ‘cons’ is given three arguments. You should use ‘cons*’ instead.
To do that you’ll also need to add this line to the top of your file:
(use-modules (srfi srfi-1)) ;for 'cons*'
HTH,
Ludo’.
Debbugs is free software and licensed under the terms of the
GNU Public License version 2. The current version can be
obtained from https://bugs.debian.org/debbugs-source/.