* Entering the sudo password before guix pull when updating the system
@ 2024-08-19 18:03 Oleander via
2024-08-19 18:16 ` Oleander via
2024-08-19 22:57 ` Ian Eure
0 siblings, 2 replies; 7+ messages in thread
From: Oleander via @ 2024-08-19 18:03 UTC (permalink / raw)
To: help-guix
How can I enter the sudo password before `guix pull` runs when updating with `guix pull && sudo guix system reconfigure config.scm`?
`sudo sh -c "su -c 'guix pull' $USER && guix system reconfigure config.scm"` returns:
"hint: After setting PATH, run hash guix to make sure your shell refers to /home/user/.config/guix/current/bin/guix"
Thank you!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Entering the sudo password before guix pull when updating the system
2024-08-19 18:03 Entering the sudo password before guix pull when updating the system Oleander via
@ 2024-08-19 18:16 ` Oleander via
2024-08-19 22:57 ` Ian Eure
1 sibling, 0 replies; 7+ messages in thread
From: Oleander via @ 2024-08-19 18:16 UTC (permalink / raw)
To: help-guix
ps: without running guix pull with root privileges.
-------- Original Message --------
On Aug 19, 2024, 20:03, Oleander wrote:
> How can I enter the sudo password before `guix pull` runs when updating with `guix pull && sudo guix system reconfigure config.scm`?
>
> `sudo sh -c "su -c 'guix pull' $USER && guix system reconfigure config.scm"` returns:
>
> "hint: After setting PATH, run hash guix to make sure your shell refers to /home/user/.config/guix/current/bin/guix"
>
> Thank you!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Entering the sudo password before guix pull when updating the system
2024-08-19 18:03 Entering the sudo password before guix pull when updating the system Oleander via
2024-08-19 18:16 ` Oleander via
@ 2024-08-19 22:57 ` Ian Eure
2024-08-20 10:38 ` Marek Paśnikowski
1 sibling, 1 reply; 7+ messages in thread
From: Ian Eure @ 2024-08-19 22:57 UTC (permalink / raw)
To: Oleander; +Cc: help-guix
Hi Oleander,
Oleander via <help-guix@gnu.org> writes:
> How can I enter the sudo password before `guix pull` runs when
> updating with `guix pull && sudo guix system reconfigure
> config.scm`?
>
I don’t believe there’s a reasonable way to do what you want. I
think your best option is to configure your sudoers file so your
user is allowed to run `guix system reconfigure' command without
needing a password. See the sudoers(5) man page and
`sudoers-file' field of the operating-system record.
Thanks,
— Ian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Entering the sudo password before guix pull when updating the system
2024-08-19 22:57 ` Ian Eure
@ 2024-08-20 10:38 ` Marek Paśnikowski
0 siblings, 0 replies; 7+ messages in thread
From: Marek Paśnikowski @ 2024-08-20 10:38 UTC (permalink / raw)
To: help-guix
Ian Eure <ian@retrospec.tv> writes:
> Hi Oleander,
>
> Oleander via <help-guix@gnu.org> writes:
>
>> How can I enter the sudo password before `guix pull` runs when updating with `guix pull && sudo
>> guix system reconfigure config.scm`?
>>
>
> I don’t believe there’s a reasonable way to do what you want. I think your best option is to
> configure your sudoers file so your user is allowed to run `guix system reconfigure' command without
> needing a password. See the sudoers(5) man page and `sudoers-file' field of the operating-system
> record.
>
> Thanks,
>
> — Ian
Good to know that Ian, thank you.
My personal approach is to remove the password prompt timeout ↓ in the
sudoers-file and just have the command chain wait for the password when
done pulling. Not time-efficient at all, but completely effortless for
me.
(define-module (suweren commons sudoers)
#:use-module (guix gexp))
(define-public %sudoers-specification*
(let ((content (string-append "root ALL=(ALL) ALL \n"
"%wheel ALL=(ALL) ALL \n"
"Defaults passwd_timeout=0 \n")))
(plain-file "sudoers" content)))
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Entering the sudo password before guix pull when updating the, system
[not found] <mailman.7266.1724149549.21382.help-guix@gnu.org>
@ 2024-08-20 11:30 ` Zelphir Kaltstahl
2024-08-20 17:44 ` Oleander via
0 siblings, 1 reply; 7+ messages in thread
From: Zelphir Kaltstahl @ 2024-08-20 11:30 UTC (permalink / raw)
To: 7059548; +Cc: help-guix, help-guix-request
> How can I enter the sudo password before `guix pull` runs when updating with
`guix pull && sudo guix system reconfigure config.scm`?
> `sudo sh -c "su -c 'guix pull' $USER && guix system reconfigure config.scm"`
returns:
> "hint: After setting PATH, run hash guix to make sure your shell refers to
/home/user/.config/guix/current/bin/guix"
> Thank you!
Hi!
In the past I learned, that when updating the guix system, I have to use:
~~~~
sudo -i
~~~~
And then run the guix commands. Otherwise guix still has/sees environment
variables from my user shell/profile/environment and that can mess up Guix. So I
want to share that bit of info with you. Hope it helps, even if not directly
related to your question.
Best wishes,
Zelphir
--
repositories:https://notabug.org/ZelphirKaltstahl,https://codeberg.org/ZelphirKaltstahl
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Entering the sudo password before guix pull when updating the, system
2024-08-20 11:30 ` Entering the sudo password before guix pull when updating the, system Zelphir Kaltstahl
@ 2024-08-20 17:44 ` Oleander via
2024-08-20 20:13 ` Marek Paśnikowski
0 siblings, 1 reply; 7+ messages in thread
From: Oleander via @ 2024-08-20 17:44 UTC (permalink / raw)
To: zelphirkaltstahl; +Cc: help-guix
Hi Zelphir!
with `sudo -i` I get the same hint.
-------- Original Message --------
On Aug 20, 2024, 13:30, Zelphir Kaltstahl wrote:
>> How can I enter the sudo password before `guix pull` runs when updating with `guix pull && sudo guix system reconfigure config.scm`?
>
>> `sudo sh -c "su -c 'guix pull' $USER && guix system reconfigure config.scm"` returns:
>
>> "hint: After setting PATH, run hash guix to make sure your shell refers to /home/user/.config/guix/current/bin/guix"
>
>> Thank you!
>
> Hi!
>
> In the past I learned, that when updating the guix system, I have to use:
>
> ~~~~
> sudo -i
> ~~~~
>
> And then run the guix commands. Otherwise guix still has/sees environment variables from my user shell/profile/environment and that can mess up Guix. So I want to share that bit of info with you. Hope it helps, even if not directly related to your question.
>
> Best wishes,
> Zelphir
>
> --
> repositories:
> https://notabug.org/ZelphirKaltstahl
> ,
> https://codeberg.org/ZelphirKaltstahl
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Entering the sudo password before guix pull when updating the, system
2024-08-20 17:44 ` Oleander via
@ 2024-08-20 20:13 ` Marek Paśnikowski
0 siblings, 0 replies; 7+ messages in thread
From: Marek Paśnikowski @ 2024-08-20 20:13 UTC (permalink / raw)
To: help-guix
Oleander via <help-guix@gnu.org> writes:
> Hi Zelphir!
>
> with `sudo -i` I get the same hint.
>
Oleander, sudo -i only applies when you perform administration as the
root user. The typical administration is done by the user in the group
wheel, which means using sudo without the -i switch.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-08-20 20:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.7266.1724149549.21382.help-guix@gnu.org>
2024-08-20 11:30 ` Entering the sudo password before guix pull when updating the, system Zelphir Kaltstahl
2024-08-20 17:44 ` Oleander via
2024-08-20 20:13 ` Marek Paśnikowski
2024-08-19 18:03 Entering the sudo password before guix pull when updating the system Oleander via
2024-08-19 18:16 ` Oleander via
2024-08-19 22:57 ` Ian Eure
2024-08-20 10:38 ` Marek Paśnikowski
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.