in reply to net::ssh::perl permission problem

Have you checked the password & home directory configurations for the lp user yet (/etc/passwd)?

User lp is not a real user, I don't know where its user home directory is set to on your system.

Now come to the secure shell (ssh) part. Secure shell requires Private-Key for the user (that is running your script) to be stored under ~user/.ssh. If this directory has not been setup (using ssh-keygen) then it will attempt to create one for you.

I am guessing that the home directory for lp might be set to /root on your system. Your perl script is attempting to access that directory. And of course that will fail because only root can access the /root/.ssh directory (/root/.ssh directory is owned by root and only accessible to root).

Another possibility is that the environment for lp user is not setup properly because it is not a real user. This is often the case on my systems as the environment for setuid users are always kept to the bare minimum.

Replies are listed 'Best First'.
Re: Re: net::ssh::perl permission problem
by Anonymous Monk on Nov 01, 2003 at 05:37 UTC
    you pretty much nailed it.

    use Env; and set the HOME directory to /tmp in the script solves the problem.