Automount broken on recent Ubuntus because of `cifs.upcall`
Situation: cifs.upcall
tries to read the $KRB5CCNAME
variable out of the process causing the upcall.
Problem: when automount(8)
is in play, that process is a mount
command exec'd by automount
; not the ls
that is trying to look into your automounted directory.
Plot twist in Act 2: cifs.upcall
still tries to second-guess and hit /tmp/krb5cc_123456
, where 123456
is the user's UID (which happens to be the right one under cruid=$UID
in the auto.footab
)
Problem #2: it has been some time since that file doesn't exist anymore under Ubuntu. These days $KRB5CCNAME is something fancier like /tmp/krb5cc_123456_abc1234def
. (Legend has it someone realized this issue... in 2009)
Solution: stick something like this into /etc/profile.d/krb5-epfl-hack.sh
.
(
krb5ccfile="$(echo "$KRB5CCNAME" | cut -d: -f2)"
cp -a "$krb5ccfile" "$(echo $krb5ccfile| cut -d_ -f1-2)"
)