* bug#29706: GuixSD: Please add the ability to change shells for root @ 2017-12-14 8:38 BJH2017 2017-12-18 22:18 ` Ludovic Courtès 0 siblings, 1 reply; 8+ messages in thread From: BJH2017 @ 2017-12-14 8:38 UTC (permalink / raw) To: 29706 [-- Attachment #1: Type: text/plain, Size: 423 bytes --] 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? [-- Attachment #2: Type: text/html, Size: 676 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#29706: GuixSD: Please add the ability to change shells for root 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 [not found] ` <CANb+58KywakA5fYBQPV6sPrdm5EFAFd3dPKRiDeK-rncTYvrPg@mail.gmail.com> 0 siblings, 1 reply; 8+ messages in thread From: Ludovic Courtès @ 2017-12-18 22:18 UTC (permalink / raw) To: BJH2017; +Cc: 29706 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’. ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <CANb+58KywakA5fYBQPV6sPrdm5EFAFd3dPKRiDeK-rncTYvrPg@mail.gmail.com>]
* bug#29706: GuixSD: Please add the ability to change shells for root [not found] ` <CANb+58KywakA5fYBQPV6sPrdm5EFAFd3dPKRiDeK-rncTYvrPg@mail.gmail.com> @ 2017-12-19 14:53 ` Ludovic Courtès 2017-12-19 15:02 ` BJH2017 0 siblings, 1 reply; 8+ messages in thread From: Ludovic Courtès @ 2017-12-19 14:53 UTC (permalink / raw) To: BJH2017; +Cc: 29706 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’. ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#29706: GuixSD: Please add the ability to change shells for root 2017-12-19 14:53 ` Ludovic Courtès @ 2017-12-19 15:02 ` BJH2017 2017-12-19 15:26 ` Ricardo Wurmus ` (3 more replies) 0 siblings, 4 replies; 8+ messages in thread From: BJH2017 @ 2017-12-19 15:02 UTC (permalink / raw) To: 29706 [-- Attachment #1: Type: text/plain, Size: 1794 bytes --] (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’. > [-- Attachment #2: Type: text/html, Size: 2948 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#29706: GuixSD: Please add the ability to change shells for root 2017-12-19 15:02 ` BJH2017 @ 2017-12-19 15:26 ` Ricardo Wurmus 2017-12-19 15:34 ` Alex Sassmannshausen ` (2 subsequent siblings) 3 siblings, 0 replies; 8+ messages in thread From: Ricardo Wurmus @ 2017-12-19 15:26 UTC (permalink / raw) To: BJH2017; +Cc: 29706 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#29706: GuixSD: Please add the ability to change shells for root 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 3 siblings, 0 replies; 8+ messages in thread From: Alex Sassmannshausen @ 2017-12-19 15:34 UTC (permalink / raw) To: BJH2017; +Cc: 29706 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’. ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#29706: GuixSD: Please add the ability to change shells for root 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 3 siblings, 0 replies; 8+ messages in thread From: Leo Famulari @ 2017-12-19 15:39 UTC (permalink / raw) To: BJH2017; +Cc: 29706 [-- Attachment #1: Type: text/plain, Size: 1391 bytes --] 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)) [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#29706: GuixSD: Please add the ability to change shells for root 2017-12-19 15:02 ` BJH2017 ` (2 preceding siblings ...) 2017-12-19 15:39 ` Leo Famulari @ 2017-12-19 17:16 ` Ludovic Courtès 3 siblings, 0 replies; 8+ messages in thread From: Ludovic Courtès @ 2017-12-19 17:16 UTC (permalink / raw) To: BJH2017; +Cc: 29706 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’. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-12-19 17:17 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 [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
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.