Jump to content

Batch Help (Runas)


Arsenic

Recommended Posts

At work I frequently have to do something on a machine that isn't logged in with administrator, but I hate logging out of the users account, then logging in with the local admin and then logging back out. So, latley, the RUNAS command has been my friend.

I wan't to write a short batch script that will give me a cmd prompt as local admin but I don't want to have to type in the +16 character insane PW. I'm doubting that it's even possible but does anyone else have any experience with this command and such?

:roll:

Link to comment
Share on other sites

No, look.

Say a computer is missing a peice of software... I come out, throw a cd in and can't install it because that account currently logged in is not an admin...I don't want it to be admin. So I open up a command prompt, and type...

run as /profile /user:%computername%%adminaccount% cmd

Then it prompts for the password and then gives me a prompt with the admin rights. From there I run the exe, close, walk away.

What I'm saying is, to enter the whole 'run as' command and then comined with the blind entering of the huge ass password, it's a pain (small, but a pain nonetheless). Say instead I carry a file that has everything pre entered, so that I don't have to hand type anything, and I get just the cmd prompt I wanted so I can work. In and out, Just like that.

I've gotten as far as the password but I don't know how to get the password to enter itself when needed.

Link to comment
Share on other sites

I understand why... pipeing from echo does not work.... < in from a text file does not work...

Yeah, I've tried those as well. I have a feeling that it's just going to be more complicated that it's worth.

I don't know much about windows, what happens if you try the password hash instead of the actual password?

Also does windows not have any cmd keys or something. I had a similar problem on Linux.

http://www.hak5.org/forums/viewtopic.php?t...p;highlight=ssh

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...