in reply to Re^2: why does perl-suid not mount
in thread why does perl-suid not mount

So the program cannot determine what the $home of the real user may be...
sudo normally sets $SUDO_UID and $SUDO_USER to the calling (original) user, which you could query in your script.

Replies are listed 'Best First'.
Re^4: why does perl-suid not mount
by Anonymous Monk on Nov 10, 2010 at 14:33 UTC

    That was a great hint. I modified the script to check for $SUDO_UID and it runs like a charm.

    Thanks a lot.

    After tidying it up, I'll put it on github in case anybody faces similar challenges.