using "runas" with "Administrator" account versus other admin accounts

On my computer, I have two admin accounts. The default admin account named "Administrator", and a new admin account named "testadmin."

If I run the following commands:

runas /user:testadmin cmd.exe
runas /user:Administrator cmd.exe

The first one opens up a new cmd.exe as "testadmin", but it's not truly running in Administrator mode, i.e. I get "Access denied" if I try to write to C:\Windows.

The second window opens up a new cmd.exe as "Administrator", but it's running in true Administrator mode. I can successfully write to any folder on my computer.

The name of the first window is "cmd.exe (running as [ComputerName]\testadmin)"

The name of the second window is "Administrator: cmd.exe (running as [ComputerName]\Administrator)"

If both accounts have admin privileges, why is there a difference in behavior here? I hate that I can't open a window from the command line as testadmin in true Administrator mode... it's really annoying.

4

3 Answers

I am assuming you are referring to a Windows 7 OS or similar. The reason you are seeing the difference between the two user accounts is because a while back when vista came out Microsoft changed their permission policies a little. Unlike in XP when you created an Admin account it had all the rights the usual Administrator account would posses. Now in Vista and Windows 7 you are a pseudo admin unless you are logged in as the actual Administrator. In most cases you can run the command prompt by right clicking the cmd.exe program and choosing to run as Administrator to get the results you want, however there are times you will need to log in to the actual Administrator account to perform your tasks. The main reason this was done was to prevent viruses from doing their nasty work and a machine.

I have seen certain software's require an install or uninstall directly from the "Administrator" account and no other, otherwise they would not work. I hope this sheds a little light on the situation.

Cheers

The accounts probably dont have the same priviledges, since there probably exist some policy that is applied directly to the Administrator account instead of the Administrators group.

But in you particular situation, its seems the the testadmin runas is not executed with elevated priviledges. See if this helps.

It is really annoying because you want something to "run as" quickly as Administrator rather than every time doing right click and select "run as administrator" etc.

I found workaround. Create shortcut of whatever you want (e.g. cmd.exe) to run as administrator and apply property "Run as administrator" to that shortcut:

enter image description here

Now you can run this shortcut quickly and it will run your intended program as administrator as you expected.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like