[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: all modern desktops need systemd, either send patches or life with it (Re: systemd now appears to be only possible init system in testing)



Holger Levsen <holger@layer-acht.org> writes:
> On Dienstag, 22. Juli 2014, Julian Gilbey wrote:

>> For me, this is a killer, as I still do not know how to solve the
>> problem I asked a while back on debian-user
>> (https://lists.debian.org/debian-user/2014/04/msg01286.html): in
>> summary, I need to unlock an encrypted filesystem during boot time by
>> asking for a password to feed into encfs.  But I cannot figure out how
>> to do this under systemd.
>> 
>> Answers to this question would also be much appreciated!

> I hope someone will be able to help Julian with this question...

This is just speculation, and I've not tried this, but my first thought in
reading this message is that the --no-tty part is a mistake.  The
documentation of that option says:

    When run with no TTY or with --no-tty it will query the password
    system-wide and allow active users to respond via several agents. The
    latter is only available to privileged processes.

However, you're doing this during boot, so there *are* no active users,
since the system hasn't come up far enough to let anyone log in yet.  So
it makes sense that you don't get a prompt.

I suspect you instead need to run systemd-ask-password with a tty.  Take a
look at systemd.exec(5) at the TTY* options for the systemd unit file.  I
suspect you need to write a unit file corresponding to your init script
that runs systemd-ask-password and uses TTYPath=/dev/tty1.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: