in reply to Re: Running a perl script with root, changing to another user and then back to root?
in thread Running a perl script with root, changing to another user and then back to root?

Could you please elaborate on that? ssh in the sub script, or ssh in the main script? Right now the main script *runs* as root since the start but after switching is stuck or either using it's privileges to check stuff.. but I need to use another user's priv. to check (that's the entire job :) )
  • Comment on Re^2: Running a perl script with root, changing to another user and then back to root?

Replies are listed 'Best First'.
Re^3: Running a perl script with root, changing to another user and then back to root?
by thanos1983 (Parson) on Feb 15, 2018 at 15:08 UTC

    Hello again morthed,

    You can ssh from the main script as root then in apply the commands that you want, close the session and continue as normal user.

    Check also the updated proposed solution that I just added.

    Hope this helps, BR.

    Seeking for Perl wisdom...on the process of learning...not there...yet!