No announcement yet.

issue with nested calls in psexec script (access denied)

  • Filter
  • Time
  • Show
Clear All
new posts

  • issue with nested calls in psexec script (access denied)


    First of all, sorry for my poor english. I would try to explain my problem.

    I am using psexec within a script to restart a cluster as follows:
    script1 in node1: perform a lot of tasks (shutdown services, check status, etc..) in the node1 and after completing all task launch with psexec the script2 in node2 (psexec-d \ \ node2 script2)
    script2 in node2: perform a lot of tasks and launches script3 in node1. Here is, when i recived an "access denied" in psexec when I try to run the script3 in node1. (psexec-d \ \ nodo1 script3)

    I launch the script with an user that belongs to the group administrators
    For security reasons I can not pass username and password, because it is not safe to leave the credentials in a .bat file.
    Additional info:

    Im running the script in W2k3 server
    I tryed a net use and its all ok
    I tryed a psexec with -u username and -p username and its all ok

    Thks a lot
    Best Regards

  • #2
    Re: issue with nested calls in psexec script (access denied)

    You have to give psexec the credentials you want it to work with otherwise it will attempt to run as an anonymous user. If you're concerned about security, create a user account who has the required permissions, lock the account down and then replace your batch script with a VBS script that you can encrypt to protect the credentials stored in it.
    Gareth Howells

    BSc (Hons), MBCS, MCP, MCDST, ICCE

    Any advice is given in good faith and without warranty.

    Please give reputation points if somebody has helped you.

    "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

    "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.