Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Runas doesn't work when called over a network


  • Please log in to reply

#1
docfxit

docfxit

    Member

  • Member
  • PipPipPip
  • 102 posts
I'm trying to run A bat file with:

- Begging of BAT file called Scan.bat
CD C:\Batch
%comspec% /K runas /user:scans "ScanFiles.exe"
- End of BAT file

When I run this within the current user (ATU4)
it runs fine. When I run it from a different
computer over a network with a user (scans) that is not logged on I get an error SAYING:
Enter the password for scans: (I input the correct password)
Attempting to start ScanFiles.exe as user "ATUUSER4\scans" ...
RUNAS ERROR: Unable to run - ScanFiles.exe
5: Access is denied.

I have tried this bat file also getting the same error:

- Begging of BAT file called Scan.bat
CD C:\Batch
runas /u:%COMPUTERNAME%\Administrator "runas /netonly /u:%USERDOMAIN%\%USERNAME% ScanFiles.exe"
- End of BAT file

When I look at Security for Scanfiles.exe it shows for ATUUSER4\Scans that it has Full control.

I have tried changing the user to administrator with the administrator password and it
produced the same error.

Then I signed on as administrator and ran with /user:administrator it produced the same error.
Process Explorer shows CMD.exe running with the user NT Authority\System.
I expected it to be running with the user ATUUSER4\Administrator.

I don't see what would stop runas from doing what it is intended to do.

It has something to do with running over the network with a user that is not logged on.

I'm running this in XP Pro sp2 NTFS "Use Simple File Sharing" is not checked.

Thank you,

Docfxit
  • 0

Advertisements


#2
docfxit

docfxit

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 102 posts
I have fixed the problem.

I was trying to use runas because I was told when launching a program through the network it doesn't have enough authority to connect to a network drive. And I was not able to get Net Use to work which confirmed it. I got it working with AutoIt without the runas.

Thank you,

Docfxit
  • 0

#3
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
glad you got it working...sorry no one got to you...i was going to suggest CPAU...i use it to do pretty much what you're doing...the difference is you can create an encrypted job that will keep the password secret...
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP