如何link pbrun 会话到原始会话?

how to link the pbrun session to the originating session?

ssh host1 -l user1
who am i
$ user1    pts/5 
pbrun su - service1
who am i
$ service1     /dev/pts/2

那么service1会话怎么判断是user1发起的呢?

这对我有用;

w>w.log
# account
grep "[=10=]" w.log | cut -f1 -d " "
# pty
grep "[=10=]" w.log | cut -f2 -d " "