Comment 10 for bug 1052038

Revision history for this message
Nobuto Murata (nobuto) wrote :

@Dustin and Tyler,

I arranged Dustin's way and I can reproduce this issue with ssh too.
(I executed an expect script by cron.)

user1 - target user with encrypted home
user2 - to login as user1 with ssh
(make sure user1 is not logged in on the start)

/etc/cron.d/ecryptfs-test
====================
* * * * * user1 sleep 30
* * * * * user2 sleep $(expr 30 - $(date +\%M) \% 5) && ~/login-as-user1 >> ~/ecryptfs-test.log
====================

~user2/login-as-user1
====================
#!/usr/bin/expect
spawn ssh user1@localhost "date -R && LANG=C ls -alF | head && mount -l | grep user1; keyctl show"
expect -exact "user1@localhost's password: "
send -- "user1\r"
send -- "\r"
expect eof
====================

I will attach ~/ecryptfs-test.log.

/var/log/auth.log
====================
Oct 5 02:28:01 ecryptfs-test CRON[4292]: pam_unix(cron:session): session opened for user user1 by (uid=0)
Oct 5 02:28:28 ecryptfs-test sshd[4479]: Error attempting to parse .ecryptfsrc file; rc = [-13]
Oct 5 02:28:28 ecryptfs-test sshd[4481]: pam_ecryptfs: Passphrase file wrapped
Oct 5 02:28:31 ecryptfs-test CRON[4292]: pam_unix(cron:session): session closed for user user1
Oct 5 02:28:31 ecryptfs-test sshd[4479]: Accepted password for user1 from 127.0.0.1 port 51140 ssh2
Oct 5 02:28:31 ecryptfs-test sshd[4479]: pam_unix(sshd:session): session opened for user user1 by (uid=0)
Oct 5 02:28:32 ecryptfs-test sshd[4646]: Received disconnect from 127.0.0.1: 11: disconnected by user
Oct 5 02:28:32 ecryptfs-test sshd[4479]: pam_unix(sshd:session): session closed for user user1
Oct 5 02:28:32 ecryptfs-test CRON[4291]: pam_unix(cron:session): session closed for user user2
====================

Could you try this way?