[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Entering the sudo password before guix pull when updating the system
From: |
Marek Paśnikowski |
Subject: |
Re: Entering the sudo password before guix pull when updating the system |
Date: |
Tue, 20 Aug 2024 12:38:01 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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)))