GNU bug report logs -
#29706
GuixSD: Please add the ability to change shells for root
Previous Next
To reply to this bug, email your comments to 29706 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#29706
; Package
guix
.
(Thu, 14 Dec 2017 08:39:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
BJH2017 <brentonhorne77 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Thu, 14 Dec 2017 08:39:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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?
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#29706
; Package
guix
.
(Mon, 18 Dec 2017 22:19:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 29706 <at> debbugs.gnu.org (full text, mbox):
Hi,
BJH2017 <brentonhorne77 <at> 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 <at> gnu.org
:
bug#29706
; Package
guix
.
(Tue, 19 Dec 2017 14:54:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 29706 <at> debbugs.gnu.org (full text, mbox):
Please always keep the list Cc’d.
BJH2017 <brentonhorne77 <at> 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 <at> gnu.org
:
bug#29706
; Package
guix
.
(Tue, 19 Dec 2017 15:03:01 GMT)
Full text and
rfc822 format available.
Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
(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 <at> gnu.org> wrote:
> Please always keep the list Cc’d.
>
> BJH2017 <brentonhorne77 <at> 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’.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#29706
; Package
guix
.
(Tue, 19 Dec 2017 15:27:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 29706 <at> debbugs.gnu.org (full text, mbox):
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 <at> gnu.org
:
bug#29706
; Package
guix
.
(Tue, 19 Dec 2017 15:35:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 29706 <at> debbugs.gnu.org (full text, mbox):
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 <at> gnu.org> wrote:
>
> Please always keep the list Cc’d.
>
> BJH2017 <brentonhorne77 <at> 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 <at> gnu.org
:
bug#29706
; Package
guix
.
(Tue, 19 Dec 2017 15:40:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 29706 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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))
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#29706
; Package
guix
.
(Tue, 19 Dec 2017 17:17:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 29706 <at> debbugs.gnu.org (full text, mbox):
Hello,
BJH2017 <brentonhorne77 <at> 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’.
This bug report was last modified 7 years and 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.