GNU bug report logs -
#53752
guix home cannot configure authorized_keys
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Zacchaeus Scheffer schreef op ma 07-02-2022 om 14:47 [-0500]:
> I was able create the desired effect with the following service
> definition:
> (simple-service
> 'my-activation-service
> home-activation-service-type
> (gexp
> (begin
> (chdir (ungexp user-home))
> (if (not (file-exists? ".ssh"))
> (mkdir ".ssh"))
> (chmod ".ssh" #o700)
> (chdir ".ssh")
> (let ((port (open-output-file "authorized_keys")))
> (display (ungexp authorized-keys) port)
> (close-port port))
> (chmod "authorized_keys" #o600)
> (chdir ".."))))
> where 'user-home and 'authorized-keys are appropriate strings defined
> earlier in the file.
>
> I believe that resolves the issue,
Users shouldn't have to do this (relatively) huge block of relatively
inscrutable code though, I believe something along these lines (or a
different solution) needs to be implemented in Guix itself somewhere
before the issue is resolved.
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 3 years and 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.