Hello, I'm trying to use paexec command in order to run some batch file as another user.

i use this command:

paexec.exe -u username -p password -i file.bat

if the user (username) is member of the administrator group it works fine, if he doesn't i get this message:

"PAExec v1.25 - Execute Programs Remotely Copyright (c) 2012-2013 Power Admin LLC www.poweradmin.com/PAExec

Using SessionID 8 (interactive session) Failed to set interactive token A required privilege is not held by the client. [Err=0x522, 1314] PAExec starting process ["file.bat"] as <username>

PAExec returning exit code -1073741502 "

It also happens even if i'm trying to run notepad.exe or anything else.

is there any chance to avoid granting the user administrative permissions?

BTW- if i do not use -i flag it works good from cmd (even if the user do not have administrator's permissions), but when i run it from process it fails.

I'll really appriciate your help! Thanks.

asked 18 Mar '15, 03:54

Yarden's gravatar image

Yarden
111
accept rate: 0%


Make sure the user account you are using actually has logon interactive privs on the target server. Either make it an admin (not-optimal) or grant it 'Allow log on locally' via GPEdit.msc.

link

answered 22 Apr '15, 11:21

J_Michael's gravatar image

J_Michael
1138
accept rate: 11%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×60
×2

Asked: 18 Mar '15, 03:54

Seen: 7,698 times

Last updated: 22 Apr '15, 11:21