Arsenic Posted February 16, 2007 Share Posted February 16, 2007 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: Quote Link to comment Share on other sites More sharing options...
SomeoneE1se Posted February 16, 2007 Share Posted February 16, 2007 Did you just ask how to run something from a batch file from a non admin account with admin rights with out ever entering any kinda of password? Quote Link to comment Share on other sites More sharing options...
Freakish Posted February 16, 2007 Share Posted February 16, 2007 Go onto the admin account, and make the user account an admin. Quote Link to comment Share on other sites More sharing options...
Arsenic Posted February 16, 2007 Author Share Posted February 16, 2007 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. Quote Link to comment Share on other sites More sharing options...
Deveant Posted February 16, 2007 Share Posted February 16, 2007 why? Quote Link to comment Share on other sites More sharing options...
Arsenic Posted February 16, 2007 Author Share Posted February 16, 2007 Convenience Quote Link to comment Share on other sites More sharing options...
SomeoneE1se Posted February 16, 2007 Share Posted February 16, 2007 I understand why... pipeing from echo does not work.... < in from a text file does not work... Quote Link to comment Share on other sites More sharing options...
Arsenic Posted February 16, 2007 Author Share Posted February 16, 2007 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. Quote Link to comment Share on other sites More sharing options...
SomeoneE1se Posted February 16, 2007 Share Posted February 16, 2007 buy a keyboard with a macro key and program that in? Quote Link to comment Share on other sites More sharing options...
Deveant Posted February 16, 2007 Share Posted February 16, 2007 if u have the password, y not sigin in with the admin account? Quote Link to comment Share on other sites More sharing options...
SomeoneE1se Posted February 16, 2007 Share Posted February 16, 2007 he has the password he's trying to automate the hell out of it Quote Link to comment Share on other sites More sharing options...
uber_tom Posted February 16, 2007 Share Posted February 16, 2007 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 Quote Link to comment Share on other sites More sharing options...
Sparda Posted February 16, 2007 Share Posted February 16, 2007 one option would be to just have a command prompt open all the time: runas /user:Administrator cmd for those who care, that long command is the windows equivalent of su ;) Quote Link to comment Share on other sites More sharing options...
lunex Posted February 17, 2007 Share Posted February 17, 2007 Convenience The pursuit of convenience leads to insecurities. Pleas do not store an administrator's password in plain text. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.