none
Submit job as different users via command line RRS feed

  • Question

  • Hi,

    I am stuck at the HPC credential issue. Say, I am User1 and I would like to create a job as another user, User2. Is there a way doing it? I tried hpccred setcreds, entered the username and password of User2. Then I run "job new", the new job is still created by User1.

    Thanks for your help in advance!

    Best

    Tuesday, October 15, 2019 9:35 PM

All replies

  • Hi Jack,

    Do you want the job owner or runas user to be User2? If job owner, you need to first impersonate as User2 e.g. 'runas /user:User2 cmd' and then run 'job new'. If job runas user, you need to run 'job submit /user:User2 /password:* <cmd>' under User1.

    Regards,

    Yutong Sun

    Friday, October 18, 2019 7:37 AM
  • Hi Yutong,

    Thanks for your reply. I would like the job owner be User2. I tried your solution before, but it requires me to enter the password in the next line, i.e., I wish I can include username and password in one line. However, runas seems not support that. I tried psexec.exe and it worked. I am wondering if there is any command of HPC that allows me to set the job owner to be User2.

    Thanks!

    Monday, October 21, 2019 3:07 PM